@stdlib/ndarray-base 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/NOTICE CHANGED
@@ -1 +1 @@
1
- Copyright (c) 2016-2021 The Stdlib Authors.
1
+ Copyright (c) 2016-2022 The Stdlib Authors.
package/README.md CHANGED
@@ -20,7 +20,7 @@ limitations under the License.
20
20
 
21
21
  # Base
22
22
 
23
- [![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] [![dependencies][dependencies-image]][dependencies-url]
23
+ [![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] <!-- [![dependencies][dependencies-image]][dependencies-url] -->
24
24
 
25
25
  > Base ndarray.
26
26
 
@@ -63,14 +63,22 @@ var o = ns;
63
63
  - <span class="signature">[`bufferDataType( buffer )`][@stdlib/ndarray/base/buffer-dtype]</span><span class="delimiter">: </span><span class="description">return the data type of an ndarray data buffer.</span>
64
64
  - <span class="signature">[`buffer( dtype, size )`][@stdlib/ndarray/base/buffer]</span><span class="delimiter">: </span><span class="description">create a zero-filled contiguous linear ndarray data buffer.</span>
65
65
  - <span class="signature">[`bytesPerElement( dtype )`][@stdlib/ndarray/base/bytes-per-element]</span><span class="delimiter">: </span><span class="description">return the number of bytes per element provided an underlying array data type.</span>
66
+ - <span class="signature">[`char2dtype( [ch] )`][@stdlib/ndarray/base/char2dtype]</span><span class="delimiter">: </span><span class="description">return the data type string associated with a provided single letter character abbreviation.</span>
66
67
  - <span class="signature">[`clampIndex( idx, max )`][@stdlib/ndarray/base/clamp-index]</span><span class="delimiter">: </span><span class="description">restrict an index to the interval `[0,max]`.</span>
67
68
  - <span class="signature">[`ndarray( dtype, buffer, shape, strides, offset, order )`][@stdlib/ndarray/base/ctor]</span><span class="delimiter">: </span><span class="description">create a multidimensional array.</span>
68
- - <span class="signature">[`dtypeChar( dtype )`][@stdlib/ndarray/base/dtype-char]</span><span class="delimiter">: </span><span class="description">return the single letter abbreviation for an underlying array data type.</span>
69
+ - <span class="signature">[`dtypeChar( [dtype] )`][@stdlib/ndarray/base/dtype-char]</span><span class="delimiter">: </span><span class="description">return the single letter abbreviation for an underlying array data type.</span>
70
+ - <span class="signature">[`dtypeDesc( [dtype] )`][@stdlib/ndarray/base/dtype-desc]</span><span class="delimiter">: </span><span class="description">return the description for a specified data type.</span>
71
+ - <span class="signature">[`dtypeEnum2Str( dtype )`][@stdlib/ndarray/base/dtype-enum2str]</span><span class="delimiter">: </span><span class="description">return the data type string associated with an ndarray data type enumeration constant.</span>
72
+ - <span class="signature">[`dtypeResolveEnum( dtype )`][@stdlib/ndarray/base/dtype-resolve-enum]</span><span class="delimiter">: </span><span class="description">return the enumeration constant associated with a supported ndarray data type value.</span>
73
+ - <span class="signature">[`dtypeResolveStr( dtype )`][@stdlib/ndarray/base/dtype-resolve-str]</span><span class="delimiter">: </span><span class="description">return the data type string associated with a supported ndarray data type value.</span>
74
+ - <span class="signature">[`dtypeStr2Enum( dtype )`][@stdlib/ndarray/base/dtype-str2enum]</span><span class="delimiter">: </span><span class="description">return the enumeration constant associated with an ndarray data type string.</span>
75
+ - <span class="signature">[`dtype2c( dtype )`][@stdlib/ndarray/base/dtype2c]</span><span class="delimiter">: </span><span class="description">return the C data type associated with a provided data type string.</span>
69
76
  - <span class="signature">[`dtypes2signatures( dtypes, nin, nout )`][@stdlib/ndarray/base/dtypes2signatures]</span><span class="delimiter">: </span><span class="description">transform a list of array argument data types into a list of signatures.</span>
70
77
  - <span class="signature">[`ind( idx, max, mode )`][@stdlib/ndarray/base/ind]</span><span class="delimiter">: </span><span class="description">return an index given an index mode.</span>
71
78
  - <span class="signature">[`ind2sub( shape, strides, offset, order, idx, mode )`][@stdlib/ndarray/base/ind2sub]</span><span class="delimiter">: </span><span class="description">convert a linear index to an array of subscripts.</span>
72
79
  - <span class="signature">[`iterationOrder( strides )`][@stdlib/ndarray/base/iteration-order]</span><span class="delimiter">: </span><span class="description">given a stride array, determine array iteration order.</span>
73
80
  - <span class="signature">[`maxViewBufferIndex( shape, strides, offset )`][@stdlib/ndarray/base/max-view-buffer-index]</span><span class="delimiter">: </span><span class="description">compute the maximum linear index in an underlying data buffer accessible to an array view.</span>
81
+ - <span class="signature">[`metaDataProps( meta, dtypes, obj )`][@stdlib/ndarray/base/meta-data-props]</span><span class="delimiter">: </span><span class="description">define non-enumerable read-only properties which expose ndarray function meta data.</span>
74
82
  - <span class="signature">[`minViewBufferIndex( shape, strides, offset )`][@stdlib/ndarray/base/min-view-buffer-index]</span><span class="delimiter">: </span><span class="description">compute the minimum linear index in an underlying data buffer accessible to an array view.</span>
75
83
  - <span class="signature">[`minmaxViewBufferIndex( shape, strides, offset )`][@stdlib/ndarray/base/minmax-view-buffer-index]</span><span class="delimiter">: </span><span class="description">compute the minimum and maximum linear indices in an underlying data buffer which are accessible to an array view.</span>
76
84
  - <span class="signature">[`nonsingletonDimensions( shape )`][@stdlib/ndarray/base/nonsingleton-dimensions]</span><span class="delimiter">: </span><span class="description">return the number of non-singleton dimensions.</span>
@@ -124,6 +132,16 @@ console.log( objectKeys( ns ) );
124
132
 
125
133
  <!-- /.examples -->
126
134
 
135
+ <!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
136
+
137
+ <section class="related">
138
+
139
+ </section>
140
+
141
+ <!-- /.related -->
142
+
143
+ <!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
144
+
127
145
 
128
146
  <section class="main-repo" >
129
147
 
@@ -148,7 +166,7 @@ See [LICENSE][stdlib-license].
148
166
 
149
167
  ## Copyright
150
168
 
151
- Copyright &copy; 2016-2021. The Stdlib [Authors][stdlib-authors].
169
+ Copyright &copy; 2016-2022. The Stdlib [Authors][stdlib-authors].
152
170
 
153
171
  </section>
154
172
 
@@ -167,9 +185,20 @@ Copyright &copy; 2016-2021. The Stdlib [Authors][stdlib-authors].
167
185
  [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/ndarray-base/main.svg
168
186
  [coverage-url]: https://codecov.io/github/stdlib-js/ndarray-base?branch=main
169
187
 
188
+ <!--
189
+
170
190
  [dependencies-image]: https://img.shields.io/david/stdlib-js/ndarray-base.svg
171
191
  [dependencies-url]: https://david-dm.org/stdlib-js/ndarray-base/main
172
192
 
193
+ -->
194
+
195
+ [umd]: https://github.com/umdjs/umd
196
+ [es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
197
+
198
+ [deno-url]: https://github.com/stdlib-js/ndarray-base/tree/deno
199
+ [umd-url]: https://github.com/stdlib-js/ndarray-base/tree/umd
200
+ [esm-url]: https://github.com/stdlib-js/ndarray-base/tree/esm
201
+
173
202
  [chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg
174
203
  [chat-url]: https://gitter.im/stdlib-js/stdlib/
175
204
 
@@ -199,12 +228,26 @@ Copyright &copy; 2016-2021. The Stdlib [Authors][stdlib-authors].
199
228
 
200
229
  [@stdlib/ndarray/base/bytes-per-element]: https://www.npmjs.com/package/@stdlib/ndarray-base-bytes-per-element
201
230
 
231
+ [@stdlib/ndarray/base/char2dtype]: https://www.npmjs.com/package/@stdlib/ndarray-base-char2dtype
232
+
202
233
  [@stdlib/ndarray/base/clamp-index]: https://www.npmjs.com/package/@stdlib/ndarray-base-clamp-index
203
234
 
204
235
  [@stdlib/ndarray/base/ctor]: https://www.npmjs.com/package/@stdlib/ndarray-base-ctor
205
236
 
206
237
  [@stdlib/ndarray/base/dtype-char]: https://www.npmjs.com/package/@stdlib/ndarray-base-dtype-char
207
238
 
239
+ [@stdlib/ndarray/base/dtype-desc]: https://www.npmjs.com/package/@stdlib/ndarray-base-dtype-desc
240
+
241
+ [@stdlib/ndarray/base/dtype-enum2str]: https://www.npmjs.com/package/@stdlib/ndarray-base-dtype-enum2str
242
+
243
+ [@stdlib/ndarray/base/dtype-resolve-enum]: https://www.npmjs.com/package/@stdlib/ndarray-base-dtype-resolve-enum
244
+
245
+ [@stdlib/ndarray/base/dtype-resolve-str]: https://www.npmjs.com/package/@stdlib/ndarray-base-dtype-resolve-str
246
+
247
+ [@stdlib/ndarray/base/dtype-str2enum]: https://www.npmjs.com/package/@stdlib/ndarray-base-dtype-str2enum
248
+
249
+ [@stdlib/ndarray/base/dtype2c]: https://www.npmjs.com/package/@stdlib/ndarray-base-dtype2c
250
+
208
251
  [@stdlib/ndarray/base/dtypes2signatures]: https://www.npmjs.com/package/@stdlib/ndarray-base-dtypes2signatures
209
252
 
210
253
  [@stdlib/ndarray/base/ind]: https://www.npmjs.com/package/@stdlib/ndarray-base-ind
@@ -215,6 +258,8 @@ Copyright &copy; 2016-2021. The Stdlib [Authors][stdlib-authors].
215
258
 
216
259
  [@stdlib/ndarray/base/max-view-buffer-index]: https://www.npmjs.com/package/@stdlib/ndarray-base-max-view-buffer-index
217
260
 
261
+ [@stdlib/ndarray/base/meta-data-props]: https://www.npmjs.com/package/@stdlib/ndarray-base-meta-data-props
262
+
218
263
  [@stdlib/ndarray/base/min-view-buffer-index]: https://www.npmjs.com/package/@stdlib/ndarray-base-min-view-buffer-index
219
264
 
220
265
  [@stdlib/ndarray/base/minmax-view-buffer-index]: https://www.npmjs.com/package/@stdlib/ndarray-base-minmax-view-buffer-index
@@ -30,14 +30,22 @@ import bufferCtors = require( '@stdlib/ndarray-base-buffer-ctors' );
30
30
  import bufferDataType = require( '@stdlib/ndarray-base-buffer-dtype' );
31
31
  import bufferDataTypeEnum = require( '@stdlib/ndarray-base-buffer-dtype-enum' );
32
32
  import bytesPerElement = require( '@stdlib/ndarray-base-bytes-per-element' );
33
+ import char2dtype = require( '@stdlib/ndarray-base-char2dtype' );
33
34
  import clampIndex = require( '@stdlib/ndarray-base-clamp-index' );
34
35
  import ndarray = require( '@stdlib/ndarray-base-ctor' );
35
36
  import dtypeChar = require( '@stdlib/ndarray-base-dtype-char' );
37
+ import dtypeDesc = require( '@stdlib/ndarray-base-dtype-desc' );
38
+ import dtypeEnum2Str = require( '@stdlib/ndarray-base-dtype-enum2str' );
39
+ import dtypeResolveEnum = require( '@stdlib/ndarray-base-dtype-resolve-enum' );
40
+ import dtypeResolveStr = require( '@stdlib/ndarray-base-dtype-resolve-str' );
41
+ import dtypeStr2Enum = require( '@stdlib/ndarray-base-dtype-str2enum' );
42
+ import dtype2c = require( '@stdlib/ndarray-base-dtype2c' );
36
43
  import dtypes2signatures = require( '@stdlib/ndarray-base-dtypes2signatures' );
37
44
  import ind = require( '@stdlib/ndarray-base-ind' );
38
45
  import ind2sub = require( '@stdlib/ndarray-base-ind2sub' );
39
46
  import iterationOrder = require( '@stdlib/ndarray-base-iteration-order' );
40
47
  import maxViewBufferIndex = require( '@stdlib/ndarray-base-max-view-buffer-index' );
48
+ import metaDataProps = require( '@stdlib/ndarray-base-meta-data-props' );
41
49
  import minViewBufferIndex = require( '@stdlib/ndarray-base-min-view-buffer-index' );
42
50
  import minmaxViewBufferIndex = require( '@stdlib/ndarray-base-minmax-view-buffer-index' );
43
51
  import nonsingletonDimensions = require( '@stdlib/ndarray-base-nonsingleton-dimensions' );
@@ -360,6 +368,17 @@ interface Namespace {
360
368
  */
361
369
  bytesPerElement: typeof bytesPerElement;
362
370
 
371
+ /**
372
+ * Returns an object mapping single letter character abbreviations to data type strings.
373
+ *
374
+ * @returns object mapping single letter character abbreviations to data type strings
375
+ *
376
+ * @example
377
+ * var out = ns.char2dtype();
378
+ * // returns {...}
379
+ */
380
+ char2dtype: typeof char2dtype;
381
+
363
382
  /**
364
383
  * Restricts an index to the interval `[0,max]`.
365
384
  *
@@ -414,19 +433,104 @@ interface Namespace {
414
433
  ndarray: typeof ndarray;
415
434
 
416
435
  /**
417
- * Returns the single letter character abbreviation for an underlying array data type.
436
+ * Returns an object mapping data type strings to single letter character abbreviations.
437
+ *
438
+ * @returns object mapping data type strings to single letter character abbreviations
439
+ *
440
+ * @example
441
+ * var obj = ns.dtypeChar();
442
+ * // returns {...}
443
+ */
444
+ dtypeChar: typeof dtypeChar;
445
+
446
+ /**
447
+ * Returns an object mapping data type strings to descriptions.
448
+ *
449
+ * @returns object mapping data type strings to descriptions
450
+ *
451
+ * @example
452
+ * var obj = ns.dtypeDesc();
453
+ * // returns {...}
454
+ */
455
+ dtypeDesc: typeof dtypeDesc;
456
+
457
+ /**
458
+ * Returns the data type string associated with an ndarray data type enumeration constant.
459
+ *
460
+ * @param dtype - data type enumeration constant
461
+ * @returns data type string
462
+ *
463
+ * @example
464
+ * var str2enum = require( `@stdlib/ndarray/base/dtype-str2enum` );
465
+ *
466
+ * var v = str2enum( 'float64' );
467
+ * // returns <number>
468
+ *
469
+ * var dt = ns.dtypeEnum2Str( v );
470
+ * // returns 'float64'
471
+ */
472
+ dtypeEnum2Str: typeof dtypeEnum2Str;
473
+
474
+ /**
475
+ * Returns the enumeration constant associated with an ndarray data type value.
476
+ *
477
+ * ## Notes
478
+ *
479
+ * - Downstream consumers of this function should **not** rely on specific integer values (e.g., `INT8 == 0`). Instead, the function should be used in an opaque manner.
480
+ *
481
+ * @param dtype - data type value
482
+ * @returns enumeration constant
483
+ *
484
+ * @example
485
+ * var v = ns.dtypeResolveEnum( 'float64' );
486
+ * // returns <number>
487
+ */
488
+ dtypeResolveEnum: typeof dtypeResolveEnum;
489
+
490
+ /**
491
+ * Returns the data type string associated with an ndarray data type value.
492
+ *
493
+ * @param dtype - data type value
494
+ * @returns data type string
495
+ *
496
+ * @example
497
+ * var str2enum = require( `@stdlib/ndarray/base/dtype-str2enum` );
498
+ *
499
+ * var v = ns.dtypeResolveStr( str2enum( 'float64' ) );
500
+ * // returns 'float64'
501
+ */
502
+ dtypeResolveStr: typeof dtypeResolveStr;
503
+
504
+ /**
505
+ * Returns the enumeration constant associated with a ndarray data type string.
506
+ *
507
+ * ## Notes
508
+ *
509
+ * - Downstream consumers of this function should **not** rely on specific integer values (e.g., `INT8 == 0`). Instead, the function should be used in an opaque manner.
510
+ *
511
+ * @param dtype - data type string
512
+ * @returns enumeration constant
513
+ *
514
+ * @example
515
+ * var v = ns.dtypeStr2Enum( 'float64' );
516
+ * // returns <number>
517
+ */
518
+ dtypeStr2Enum: typeof dtypeStr2Enum;
519
+
520
+ /**
521
+ * Returns the C data type associated with a provided data type string.
418
522
  *
419
523
  * @param dtype - data type
420
- * @returns single letter character abbreviation
524
+ * @returns C data type (or null)
421
525
  *
422
526
  * @example
423
- * var ch = ns.dtypeChar( 'float64' );
424
- * // returns 'd'
527
+ * var out = ns.dtype2c( 'float64' );
528
+ * // returns 'double'
425
529
  *
426
- * ch = ns.dtypeChar( 'generic' );
427
- * // returns 'o'
530
+ * out = ns.dtype2c( 'generic' );
531
+ * // returns null
428
532
  */
429
- dtypeChar: typeof dtypeChar;
533
+ dtype2c: typeof dtype2c;
430
534
 
431
535
  /**
432
536
  * Transforms a list of array argument data types into a list of signatures.
@@ -434,7 +538,7 @@ interface Namespace {
434
538
  * @param dtypes - list of array argument data types
435
539
  * @param nin - number of input array arguments
436
540
  * @param nout - number of output array arguments
437
- * @throws first argument must be an array-like object containing strings
541
+ * @throws first argument must be an array-like object
438
542
  * @throws second argument must be a nonnegative integer
439
543
  * @throws third argument must be a nonnegative integer
440
544
  * @throws first argument must have at least one element
@@ -663,6 +767,40 @@ interface Namespace {
663
767
  */
664
768
  maxViewBufferIndex: typeof maxViewBufferIndex;
665
769
 
770
+ /**
771
+ * Defines non-enumerable read-only properties which expose ndarray function meta data.
772
+ *
773
+ * @param meta - function meta data
774
+ * @param meta.nargs - total number of arguments
775
+ * @param meta.nin - total number of input arrays
776
+ * @param meta.nout - total number of output arrays
777
+ * @param dtypes - list of ndarray data types
778
+ * @param obj - object on which to define properties
779
+ * @returns object on which properties were defined
780
+ *
781
+ * @example
782
+ * // Define ndarray function meta data:
783
+ * var meta = {
784
+ * 'nargs': 2,
785
+ * 'nin': 1,
786
+ * 'nout': 1
787
+ * };
788
+ *
789
+ * // Define the list of ndarray data types:
790
+ * var dtypes = [
791
+ * 'float64', 'float64',
792
+ * 'float32', 'float32',
793
+ * 'generic', 'generic'
794
+ * ];
795
+ *
796
+ * // Define an object/function on which to set the properties:
797
+ * var obj = {};
798
+ *
799
+ * // Set the properties:
800
+ * ns.metaDataProps( meta, dtypes, obj );
801
+ */
802
+ metaDataProps: typeof metaDataProps;
803
+
666
804
  /**
667
805
  * Computes the minimum linear index in an underlying data buffer accessible to an array view.
668
806
  *
package/lib/index.js CHANGED
@@ -117,6 +117,15 @@ setReadOnly( ns, 'bufferDataTypeEnum', require( '@stdlib/ndarray-base-buffer-dty
117
117
  */
118
118
  setReadOnly( ns, 'bytesPerElement', require( '@stdlib/ndarray-base-bytes-per-element' ) );
119
119
 
120
+ /**
121
+ * @name char2dtype
122
+ * @memberof ns
123
+ * @readonly
124
+ * @type {Function}
125
+ * @see {@link module:@stdlib/ndarray/base/char2dtype}
126
+ */
127
+ setReadOnly( ns, 'char2dtype', require( '@stdlib/ndarray-base-char2dtype' ) );
128
+
120
129
  /**
121
130
  * @name clampIndex
122
131
  * @memberof ns
@@ -144,6 +153,60 @@ setReadOnly( ns, 'ndarray', require( '@stdlib/ndarray-base-ctor' ) );
144
153
  */
145
154
  setReadOnly( ns, 'dtypeChar', require( '@stdlib/ndarray-base-dtype-char' ) );
146
155
 
156
+ /**
157
+ * @name dtypeDesc
158
+ * @memberof ns
159
+ * @readonly
160
+ * @type {Function}
161
+ * @see {@link module:@stdlib/ndarray/base/dtype-desc}
162
+ */
163
+ setReadOnly( ns, 'dtypeDesc', require( '@stdlib/ndarray-base-dtype-desc' ) );
164
+
165
+ /**
166
+ * @name dtypeEnum2Str
167
+ * @memberof ns
168
+ * @readonly
169
+ * @type {Function}
170
+ * @see {@link module:@stdlib/ndarray/base/dtype-enum2str}
171
+ */
172
+ setReadOnly( ns, 'dtypeEnum2Str', require( '@stdlib/ndarray-base-dtype-enum2str' ) );
173
+
174
+ /**
175
+ * @name dtypeResolveEnum
176
+ * @memberof ns
177
+ * @readonly
178
+ * @type {Function}
179
+ * @see {@link module:@stdlib/ndarray/base/dtype-resolve-enum}
180
+ */
181
+ setReadOnly( ns, 'dtypeResolveEnum', require( '@stdlib/ndarray-base-dtype-resolve-enum' ) );
182
+
183
+ /**
184
+ * @name dtypeResolveStr
185
+ * @memberof ns
186
+ * @readonly
187
+ * @type {Function}
188
+ * @see {@link module:@stdlib/ndarray/base/dtype-resolve-str}
189
+ */
190
+ setReadOnly( ns, 'dtypeResolveStr', require( '@stdlib/ndarray-base-dtype-resolve-str' ) );
191
+
192
+ /**
193
+ * @name dtypeStr2Enum
194
+ * @memberof ns
195
+ * @readonly
196
+ * @type {Function}
197
+ * @see {@link module:@stdlib/ndarray/base/dtype-str2enum}
198
+ */
199
+ setReadOnly( ns, 'dtypeStr2Enum', require( '@stdlib/ndarray-base-dtype-str2enum' ) );
200
+
201
+ /**
202
+ * @name dtype2c
203
+ * @memberof ns
204
+ * @readonly
205
+ * @type {Function}
206
+ * @see {@link module:@stdlib/ndarray/base/dtype2c}
207
+ */
208
+ setReadOnly( ns, 'dtype2c', require( '@stdlib/ndarray-base-dtype2c' ) );
209
+
147
210
  /**
148
211
  * @name dtypes2signatures
149
212
  * @memberof ns
@@ -153,6 +216,24 @@ setReadOnly( ns, 'dtypeChar', require( '@stdlib/ndarray-base-dtype-char' ) );
153
216
  */
154
217
  setReadOnly( ns, 'dtypes2signatures', require( '@stdlib/ndarray-base-dtypes2signatures' ) );
155
218
 
219
+ /**
220
+ * @name expandDimensions
221
+ * @memberof ns
222
+ * @readonly
223
+ * @type {Function}
224
+ * @see {@link module:@stdlib/ndarray/base/expand-dimensions}
225
+ */
226
+ setReadOnly( ns, 'expandDimensions', require( '@stdlib/ndarray-base-expand-dimensions' ) );
227
+
228
+ /**
229
+ * @name scalar2ndarray
230
+ * @memberof ns
231
+ * @readonly
232
+ * @type {Function}
233
+ * @see {@link module:@stdlib/ndarray/base/from-scalar}
234
+ */
235
+ setReadOnly( ns, 'scalar2ndarray', require( '@stdlib/ndarray-base-from-scalar' ) );
236
+
156
237
  /**
157
238
  * @name ind
158
239
  * @memberof ns
@@ -189,6 +270,24 @@ setReadOnly( ns, 'iterationOrder', require( '@stdlib/ndarray-base-iteration-orde
189
270
  */
190
271
  setReadOnly( ns, 'maxViewBufferIndex', require( '@stdlib/ndarray-base-max-view-buffer-index' ) );
191
272
 
273
+ /**
274
+ * @name maybeBroadcastArray
275
+ * @memberof ns
276
+ * @readonly
277
+ * @type {Function}
278
+ * @see {@link module:@stdlib/ndarray/base/maybe-broadcast-array}
279
+ */
280
+ setReadOnly( ns, 'maybeBroadcastArray', require( '@stdlib/ndarray-base-maybe-broadcast-array' ) );
281
+
282
+ /**
283
+ * @name metaDataProps
284
+ * @memberof ns
285
+ * @readonly
286
+ * @type {Function}
287
+ * @see {@link module:@stdlib/ndarray/base/meta-data-props}
288
+ */
289
+ setReadOnly( ns, 'metaDataProps', require( '@stdlib/ndarray-base-meta-data-props' ) );
290
+
192
291
  /**
193
292
  * @name minViewBufferIndex
194
293
  * @memberof ns
@@ -207,6 +306,15 @@ setReadOnly( ns, 'minViewBufferIndex', require( '@stdlib/ndarray-base-min-view-b
207
306
  */
208
307
  setReadOnly( ns, 'minmaxViewBufferIndex', require( '@stdlib/ndarray-base-minmax-view-buffer-index' ) );
209
308
 
309
+ /**
310
+ * @name ndarraylike2object
311
+ * @memberof ns
312
+ * @readonly
313
+ * @type {Function}
314
+ * @see {@link module:@stdlib/ndarray/base/ndarraylike2object}
315
+ */
316
+ setReadOnly( ns, 'ndarraylike2object', require( '@stdlib/ndarray-base-ndarraylike2object' ) );
317
+
210
318
  /**
211
319
  * @name nonsingletonDimensions
212
320
  * @memberof ns
@@ -225,6 +333,24 @@ setReadOnly( ns, 'nonsingletonDimensions', require( '@stdlib/ndarray-base-nonsin
225
333
  */
226
334
  setReadOnly( ns, 'numel', require( '@stdlib/ndarray-base-numel' ) );
227
335
 
336
+ /**
337
+ * @name prependSingletonDimensions
338
+ * @memberof ns
339
+ * @readonly
340
+ * @type {Function}
341
+ * @see {@link module:@stdlib/ndarray/base/prepend-singleton-dimensions}
342
+ */
343
+ setReadOnly( ns, 'prependSingletonDimensions', require( '@stdlib/ndarray-base-prepend-singleton-dimensions' ) );
344
+
345
+ /**
346
+ * @name removeSingletonDimensions
347
+ * @memberof ns
348
+ * @readonly
349
+ * @type {Function}
350
+ * @see {@link module:@stdlib/ndarray/base/remove-singleton-dimensions}
351
+ */
352
+ setReadOnly( ns, 'removeSingletonDimensions', require( '@stdlib/ndarray-base-remove-singleton-dimensions' ) );
353
+
228
354
  /**
229
355
  * @name serializeMetaData
230
356
  * @memberof ns
@@ -288,6 +414,15 @@ setReadOnly( ns, 'sub2ind', require( '@stdlib/ndarray-base-sub2ind' ) );
288
414
  */
289
415
  setReadOnly( ns, 'ndarray2array', require( '@stdlib/ndarray-base-to-array' ) );
290
416
 
417
+ /**
418
+ * @name transpose
419
+ * @memberof ns
420
+ * @readonly
421
+ * @type {Function}
422
+ * @see {@link module:@stdlib/ndarray/base/transpose}
423
+ */
424
+ setReadOnly( ns, 'transpose', require( '@stdlib/ndarray-base-transpose' ) );
425
+
291
426
  /**
292
427
  * @name vind2bind
293
428
  * @memberof ns
@@ -306,6 +441,24 @@ setReadOnly( ns, 'vind2bind', require( '@stdlib/ndarray-base-vind2bind' ) );
306
441
  */
307
442
  setReadOnly( ns, 'wrapIndex', require( '@stdlib/ndarray-base-wrap-index' ) );
308
443
 
444
+ /**
445
+ * @name zeros
446
+ * @memberof ns
447
+ * @readonly
448
+ * @type {Function}
449
+ * @see {@link module:@stdlib/ndarray/base/zeros}
450
+ */
451
+ setReadOnly( ns, 'zeros', require( '@stdlib/ndarray-base-zeros' ) );
452
+
453
+ /**
454
+ * @name zerosLike
455
+ * @memberof ns
456
+ * @readonly
457
+ * @type {Function}
458
+ * @see {@link module:@stdlib/ndarray/base/zeros-like}
459
+ */
460
+ setReadOnly( ns, 'zerosLike', require( '@stdlib/ndarray-base-zeros-like' ) );
461
+
309
462
 
310
463
  // EXPORTS //
311
464
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stdlib/ndarray-base",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "Base ndarray.",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -45,18 +45,32 @@
45
45
  "@stdlib/ndarray-base-buffer-dtype": "^0.0.x",
46
46
  "@stdlib/ndarray-base-buffer-dtype-enum": "^0.0.x",
47
47
  "@stdlib/ndarray-base-bytes-per-element": "^0.0.x",
48
+ "@stdlib/ndarray-base-char2dtype": "^0.0.x",
48
49
  "@stdlib/ndarray-base-clamp-index": "^0.0.x",
49
50
  "@stdlib/ndarray-base-ctor": "^0.0.x",
50
51
  "@stdlib/ndarray-base-dtype-char": "^0.0.x",
52
+ "@stdlib/ndarray-base-dtype-desc": "^0.0.x",
53
+ "@stdlib/ndarray-base-dtype-enum2str": "^0.0.x",
54
+ "@stdlib/ndarray-base-dtype-resolve-enum": "^0.0.x",
55
+ "@stdlib/ndarray-base-dtype-resolve-str": "^0.0.x",
56
+ "@stdlib/ndarray-base-dtype-str2enum": "^0.0.x",
57
+ "@stdlib/ndarray-base-dtype2c": "^0.0.x",
51
58
  "@stdlib/ndarray-base-dtypes2signatures": "^0.0.x",
59
+ "@stdlib/ndarray-base-expand-dimensions": "^0.0.x",
60
+ "@stdlib/ndarray-base-from-scalar": "^0.0.x",
52
61
  "@stdlib/ndarray-base-ind": "^0.0.x",
53
62
  "@stdlib/ndarray-base-ind2sub": "^0.0.x",
54
63
  "@stdlib/ndarray-base-iteration-order": "^0.0.x",
55
64
  "@stdlib/ndarray-base-max-view-buffer-index": "^0.0.x",
65
+ "@stdlib/ndarray-base-maybe-broadcast-array": "^0.0.x",
66
+ "@stdlib/ndarray-base-meta-data-props": "^0.0.x",
56
67
  "@stdlib/ndarray-base-min-view-buffer-index": "^0.0.x",
57
68
  "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.0.x",
69
+ "@stdlib/ndarray-base-ndarraylike2object": "^0.0.x",
58
70
  "@stdlib/ndarray-base-nonsingleton-dimensions": "^0.0.x",
59
71
  "@stdlib/ndarray-base-numel": "^0.0.x",
72
+ "@stdlib/ndarray-base-prepend-singleton-dimensions": "^0.0.x",
73
+ "@stdlib/ndarray-base-remove-singleton-dimensions": "^0.0.x",
60
74
  "@stdlib/ndarray-base-serialize-meta-data": "^0.0.x",
61
75
  "@stdlib/ndarray-base-shape2strides": "^0.0.x",
62
76
  "@stdlib/ndarray-base-singleton-dimensions": "^0.0.x",
@@ -64,16 +78,21 @@
64
78
  "@stdlib/ndarray-base-strides2order": "^0.0.x",
65
79
  "@stdlib/ndarray-base-sub2ind": "^0.0.x",
66
80
  "@stdlib/ndarray-base-to-array": "^0.0.x",
81
+ "@stdlib/ndarray-base-transpose": "^0.0.x",
67
82
  "@stdlib/ndarray-base-vind2bind": "^0.0.x",
68
83
  "@stdlib/ndarray-base-wrap-index": "^0.0.x",
84
+ "@stdlib/ndarray-base-zeros": "^0.0.x",
85
+ "@stdlib/ndarray-base-zeros-like": "^0.0.x",
69
86
  "@stdlib/utils-define-read-only-property": "^0.0.x"
70
87
  },
71
88
  "devDependencies": {
89
+ "@stdlib/array-base-arraylike2object": "^0.0.x",
72
90
  "@stdlib/array-buffer": "^0.0.x",
73
91
  "@stdlib/array-complex128": "^0.0.x",
74
92
  "@stdlib/array-complex64": "^0.0.x",
75
93
  "@stdlib/array-dataview": "^0.0.x",
76
94
  "@stdlib/array-filled": "^0.0.x",
95
+ "@stdlib/array-filled-by": "^0.0.x",
77
96
  "@stdlib/array-float32": "^0.0.x",
78
97
  "@stdlib/array-float64": "^0.0.x",
79
98
  "@stdlib/array-int16": "^0.0.x",
@@ -120,14 +139,15 @@
120
139
  "@stdlib/assert-is-uint8clampedarray": "^0.0.x",
121
140
  "@stdlib/bench": "^0.0.x",
122
141
  "@stdlib/bigint-ctor": "^0.0.x",
123
- "@stdlib/blas-ext-base-gfill-by": "^0.0.x",
124
142
  "@stdlib/buffer-alloc-unsafe": "^0.0.x",
125
143
  "@stdlib/buffer-ctor": "^0.0.x",
126
144
  "@stdlib/buffer-from-array": "^0.0.x",
127
145
  "@stdlib/complex-float32": "^0.0.x",
128
146
  "@stdlib/complex-float64": "^0.0.x",
129
147
  "@stdlib/complex-imag": "^0.0.x",
148
+ "@stdlib/complex-imagf": "^0.0.x",
130
149
  "@stdlib/complex-real": "^0.0.x",
150
+ "@stdlib/complex-realf": "^0.0.x",
131
151
  "@stdlib/math-base-assert-is-nan": "^0.0.x",
132
152
  "@stdlib/math-base-special-abs": "^0.0.x",
133
153
  "@stdlib/math-base-special-cbrt": "^0.0.x",
@@ -148,6 +168,7 @@
148
168
  "@stdlib/ndarray-base-assert-is-data-type": "^0.0.x",
149
169
  "@stdlib/ndarray-base-assert-is-index-mode": "^0.0.x",
150
170
  "@stdlib/ndarray-base-assert-is-order": "^0.0.x",
171
+ "@stdlib/ndarray-base-assert-is-read-only": "^0.0.x",
151
172
  "@stdlib/ndarray-base-assert-is-row-major": "^0.0.x",
152
173
  "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.0.x",
153
174
  "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.0.x",
@@ -165,12 +186,17 @@
165
186
  "@stdlib/number-float64-base-to-int64-bytes": "^0.0.x",
166
187
  "@stdlib/random-base-discrete-uniform": "^0.0.x",
167
188
  "@stdlib/random-base-randu": "^0.0.x",
189
+ "@stdlib/strided-base-reinterpret-complex128": "^0.0.x",
190
+ "@stdlib/strided-base-reinterpret-complex64": "^0.0.x",
191
+ "@stdlib/strided-dtypes": "^0.0.x",
168
192
  "@stdlib/string-left-pad": "^0.0.x",
169
193
  "@stdlib/string-replace": "^0.0.x",
194
+ "@stdlib/string-right-pad": "^0.0.x",
170
195
  "@stdlib/utils-constructor-name": "^0.0.x",
171
196
  "@stdlib/utils-define-nonenumerable-read-only-accessor": "^0.0.x",
172
197
  "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x",
173
198
  "@stdlib/utils-keys": "^0.0.x",
199
+ "@stdlib/utils-object-inverse": "^0.0.x",
174
200
  "@stdlib/utils-try-require": "^0.0.x",
175
201
  "proxyquire": "^2.0.0",
176
202
  "tape": "git+https://github.com/kgryte/tape.git#fix/globby",