@stdlib/ndarray-base 0.0.6 → 0.1.0
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/CITATION.cff +30 -0
- package/LICENSE +0 -304
- package/NOTICE +1 -1
- package/README.md +141 -6
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +7 -0
- package/docs/types/index.d.ts +914 -13
- package/lib/index.js +310 -0
- package/package.json +222 -138
- package/docs/types/test.ts +0 -29
package/lib/index.js
CHANGED
|
@@ -22,6 +22,10 @@
|
|
|
22
22
|
* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
+
/*
|
|
26
|
+
* The following modules are intentionally not exported: function-object, napi, unary
|
|
27
|
+
*/
|
|
28
|
+
|
|
25
29
|
// MODULES //
|
|
26
30
|
|
|
27
31
|
var setReadOnly = require( '@stdlib/utils-define-read-only-property' );
|
|
@@ -45,6 +49,24 @@ var ns = {};
|
|
|
45
49
|
*/
|
|
46
50
|
setReadOnly( ns, 'assert', require( '@stdlib/ndarray-base-assert' ) );
|
|
47
51
|
|
|
52
|
+
/**
|
|
53
|
+
* @name binaryLoopOrder
|
|
54
|
+
* @memberof ns
|
|
55
|
+
* @readonly
|
|
56
|
+
* @type {Function}
|
|
57
|
+
* @see {@link module:@stdlib/ndarray/base/binary-loop-interchange-order}
|
|
58
|
+
*/
|
|
59
|
+
setReadOnly( ns, 'binaryLoopOrder', require( '@stdlib/ndarray-base-binary-loop-interchange-order' ) );
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* @name binaryBlockSize
|
|
63
|
+
* @memberof ns
|
|
64
|
+
* @readonly
|
|
65
|
+
* @type {Function}
|
|
66
|
+
* @see {@link module:@stdlib/ndarray/base/binary-tiling-block-size}
|
|
67
|
+
*/
|
|
68
|
+
setReadOnly( ns, 'binaryBlockSize', require( '@stdlib/ndarray-base-binary-tiling-block-size' ) );
|
|
69
|
+
|
|
48
70
|
/**
|
|
49
71
|
* @name bind2vind
|
|
50
72
|
* @memberof ns
|
|
@@ -63,6 +85,15 @@ setReadOnly( ns, 'bind2vind', require( '@stdlib/ndarray-base-bind2vind' ) );
|
|
|
63
85
|
*/
|
|
64
86
|
setReadOnly( ns, 'broadcastArray', require( '@stdlib/ndarray-base-broadcast-array' ) );
|
|
65
87
|
|
|
88
|
+
/**
|
|
89
|
+
* @name broadcastScalar
|
|
90
|
+
* @memberof ns
|
|
91
|
+
* @readonly
|
|
92
|
+
* @type {Function}
|
|
93
|
+
* @see {@link module:@stdlib/ndarray/base/broadcast-scalar}
|
|
94
|
+
*/
|
|
95
|
+
setReadOnly( ns, 'broadcastScalar', require( '@stdlib/ndarray-base-broadcast-scalar' ) );
|
|
96
|
+
|
|
66
97
|
/**
|
|
67
98
|
* @name broadcastShapes
|
|
68
99
|
* @memberof ns
|
|
@@ -117,6 +148,15 @@ setReadOnly( ns, 'bufferDataTypeEnum', require( '@stdlib/ndarray-base-buffer-dty
|
|
|
117
148
|
*/
|
|
118
149
|
setReadOnly( ns, 'bytesPerElement', require( '@stdlib/ndarray-base-bytes-per-element' ) );
|
|
119
150
|
|
|
151
|
+
/**
|
|
152
|
+
* @name char2dtype
|
|
153
|
+
* @memberof ns
|
|
154
|
+
* @readonly
|
|
155
|
+
* @type {Function}
|
|
156
|
+
* @see {@link module:@stdlib/ndarray/base/char2dtype}
|
|
157
|
+
*/
|
|
158
|
+
setReadOnly( ns, 'char2dtype', require( '@stdlib/ndarray-base-char2dtype' ) );
|
|
159
|
+
|
|
120
160
|
/**
|
|
121
161
|
* @name clampIndex
|
|
122
162
|
* @memberof ns
|
|
@@ -144,6 +184,60 @@ setReadOnly( ns, 'ndarray', require( '@stdlib/ndarray-base-ctor' ) );
|
|
|
144
184
|
*/
|
|
145
185
|
setReadOnly( ns, 'dtypeChar', require( '@stdlib/ndarray-base-dtype-char' ) );
|
|
146
186
|
|
|
187
|
+
/**
|
|
188
|
+
* @name dtypeDesc
|
|
189
|
+
* @memberof ns
|
|
190
|
+
* @readonly
|
|
191
|
+
* @type {Function}
|
|
192
|
+
* @see {@link module:@stdlib/ndarray/base/dtype-desc}
|
|
193
|
+
*/
|
|
194
|
+
setReadOnly( ns, 'dtypeDesc', require( '@stdlib/ndarray-base-dtype-desc' ) );
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* @name dtypeEnum2Str
|
|
198
|
+
* @memberof ns
|
|
199
|
+
* @readonly
|
|
200
|
+
* @type {Function}
|
|
201
|
+
* @see {@link module:@stdlib/ndarray/base/dtype-enum2str}
|
|
202
|
+
*/
|
|
203
|
+
setReadOnly( ns, 'dtypeEnum2Str', require( '@stdlib/ndarray-base-dtype-enum2str' ) );
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* @name dtypeResolveEnum
|
|
207
|
+
* @memberof ns
|
|
208
|
+
* @readonly
|
|
209
|
+
* @type {Function}
|
|
210
|
+
* @see {@link module:@stdlib/ndarray/base/dtype-resolve-enum}
|
|
211
|
+
*/
|
|
212
|
+
setReadOnly( ns, 'dtypeResolveEnum', require( '@stdlib/ndarray-base-dtype-resolve-enum' ) );
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* @name dtypeResolveStr
|
|
216
|
+
* @memberof ns
|
|
217
|
+
* @readonly
|
|
218
|
+
* @type {Function}
|
|
219
|
+
* @see {@link module:@stdlib/ndarray/base/dtype-resolve-str}
|
|
220
|
+
*/
|
|
221
|
+
setReadOnly( ns, 'dtypeResolveStr', require( '@stdlib/ndarray-base-dtype-resolve-str' ) );
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* @name dtypeStr2Enum
|
|
225
|
+
* @memberof ns
|
|
226
|
+
* @readonly
|
|
227
|
+
* @type {Function}
|
|
228
|
+
* @see {@link module:@stdlib/ndarray/base/dtype-str2enum}
|
|
229
|
+
*/
|
|
230
|
+
setReadOnly( ns, 'dtypeStr2Enum', require( '@stdlib/ndarray-base-dtype-str2enum' ) );
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* @name dtype2c
|
|
234
|
+
* @memberof ns
|
|
235
|
+
* @readonly
|
|
236
|
+
* @type {Function}
|
|
237
|
+
* @see {@link module:@stdlib/ndarray/base/dtype2c}
|
|
238
|
+
*/
|
|
239
|
+
setReadOnly( ns, 'dtype2c', require( '@stdlib/ndarray-base-dtype2c' ) );
|
|
240
|
+
|
|
147
241
|
/**
|
|
148
242
|
* @name dtypes2signatures
|
|
149
243
|
* @memberof ns
|
|
@@ -153,6 +247,42 @@ setReadOnly( ns, 'dtypeChar', require( '@stdlib/ndarray-base-dtype-char' ) );
|
|
|
153
247
|
*/
|
|
154
248
|
setReadOnly( ns, 'dtypes2signatures', require( '@stdlib/ndarray-base-dtypes2signatures' ) );
|
|
155
249
|
|
|
250
|
+
/**
|
|
251
|
+
* @name empty
|
|
252
|
+
* @memberof ns
|
|
253
|
+
* @readonly
|
|
254
|
+
* @type {Function}
|
|
255
|
+
* @see {@link module:@stdlib/ndarray/base/empty}
|
|
256
|
+
*/
|
|
257
|
+
setReadOnly( ns, 'empty', require( '@stdlib/ndarray-base-empty' ) );
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* @name emptyLike
|
|
261
|
+
* @memberof ns
|
|
262
|
+
* @readonly
|
|
263
|
+
* @type {Function}
|
|
264
|
+
* @see {@link module:@stdlib/ndarray/base/empty-like}
|
|
265
|
+
*/
|
|
266
|
+
setReadOnly( ns, 'emptyLike', require( '@stdlib/ndarray-base-empty-like' ) );
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* @name expandDimensions
|
|
270
|
+
* @memberof ns
|
|
271
|
+
* @readonly
|
|
272
|
+
* @type {Function}
|
|
273
|
+
* @see {@link module:@stdlib/ndarray/base/expand-dimensions}
|
|
274
|
+
*/
|
|
275
|
+
setReadOnly( ns, 'expandDimensions', require( '@stdlib/ndarray-base-expand-dimensions' ) );
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* @name scalar2ndarray
|
|
279
|
+
* @memberof ns
|
|
280
|
+
* @readonly
|
|
281
|
+
* @type {Function}
|
|
282
|
+
* @see {@link module:@stdlib/ndarray/base/from-scalar}
|
|
283
|
+
*/
|
|
284
|
+
setReadOnly( ns, 'scalar2ndarray', require( '@stdlib/ndarray-base-from-scalar' ) );
|
|
285
|
+
|
|
156
286
|
/**
|
|
157
287
|
* @name ind
|
|
158
288
|
* @memberof ns
|
|
@@ -189,6 +319,24 @@ setReadOnly( ns, 'iterationOrder', require( '@stdlib/ndarray-base-iteration-orde
|
|
|
189
319
|
*/
|
|
190
320
|
setReadOnly( ns, 'maxViewBufferIndex', require( '@stdlib/ndarray-base-max-view-buffer-index' ) );
|
|
191
321
|
|
|
322
|
+
/**
|
|
323
|
+
* @name maybeBroadcastArray
|
|
324
|
+
* @memberof ns
|
|
325
|
+
* @readonly
|
|
326
|
+
* @type {Function}
|
|
327
|
+
* @see {@link module:@stdlib/ndarray/base/maybe-broadcast-array}
|
|
328
|
+
*/
|
|
329
|
+
setReadOnly( ns, 'maybeBroadcastArray', require( '@stdlib/ndarray-base-maybe-broadcast-array' ) );
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* @name metaDataProps
|
|
333
|
+
* @memberof ns
|
|
334
|
+
* @readonly
|
|
335
|
+
* @type {Function}
|
|
336
|
+
* @see {@link module:@stdlib/ndarray/base/meta-data-props}
|
|
337
|
+
*/
|
|
338
|
+
setReadOnly( ns, 'metaDataProps', require( '@stdlib/ndarray-base-meta-data-props' ) );
|
|
339
|
+
|
|
192
340
|
/**
|
|
193
341
|
* @name minViewBufferIndex
|
|
194
342
|
* @memberof ns
|
|
@@ -207,6 +355,15 @@ setReadOnly( ns, 'minViewBufferIndex', require( '@stdlib/ndarray-base-min-view-b
|
|
|
207
355
|
*/
|
|
208
356
|
setReadOnly( ns, 'minmaxViewBufferIndex', require( '@stdlib/ndarray-base-minmax-view-buffer-index' ) );
|
|
209
357
|
|
|
358
|
+
/**
|
|
359
|
+
* @name ndarraylike2object
|
|
360
|
+
* @memberof ns
|
|
361
|
+
* @readonly
|
|
362
|
+
* @type {Function}
|
|
363
|
+
* @see {@link module:@stdlib/ndarray/base/ndarraylike2object}
|
|
364
|
+
*/
|
|
365
|
+
setReadOnly( ns, 'ndarraylike2object', require( '@stdlib/ndarray-base-ndarraylike2object' ) );
|
|
366
|
+
|
|
210
367
|
/**
|
|
211
368
|
* @name nonsingletonDimensions
|
|
212
369
|
* @memberof ns
|
|
@@ -216,6 +373,33 @@ setReadOnly( ns, 'minmaxViewBufferIndex', require( '@stdlib/ndarray-base-minmax-
|
|
|
216
373
|
*/
|
|
217
374
|
setReadOnly( ns, 'nonsingletonDimensions', require( '@stdlib/ndarray-base-nonsingleton-dimensions' ) );
|
|
218
375
|
|
|
376
|
+
/**
|
|
377
|
+
* @name nullary
|
|
378
|
+
* @memberof ns
|
|
379
|
+
* @readonly
|
|
380
|
+
* @type {Function}
|
|
381
|
+
* @see {@link module:@stdlib/ndarray/base/nullary}
|
|
382
|
+
*/
|
|
383
|
+
setReadOnly( ns, 'nullary', require( '@stdlib/ndarray-base-nullary' ) );
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* @name nullaryLoopOrder
|
|
387
|
+
* @memberof ns
|
|
388
|
+
* @readonly
|
|
389
|
+
* @type {Function}
|
|
390
|
+
* @see {@link module:@stdlib/ndarray/base/nullary-loop-interchange-order}
|
|
391
|
+
*/
|
|
392
|
+
setReadOnly( ns, 'nullaryLoopOrder', require( '@stdlib/ndarray-base-nullary-loop-interchange-order' ) );
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* @name nullaryBlockSize
|
|
396
|
+
* @memberof ns
|
|
397
|
+
* @readonly
|
|
398
|
+
* @type {Function}
|
|
399
|
+
* @see {@link module:@stdlib/ndarray/base/nullary-tiling-block-size}
|
|
400
|
+
*/
|
|
401
|
+
setReadOnly( ns, 'nullaryBlockSize', require( '@stdlib/ndarray-base-nullary-tiling-block-size' ) );
|
|
402
|
+
|
|
219
403
|
/**
|
|
220
404
|
* @name numel
|
|
221
405
|
* @memberof ns
|
|
@@ -225,6 +409,60 @@ setReadOnly( ns, 'nonsingletonDimensions', require( '@stdlib/ndarray-base-nonsin
|
|
|
225
409
|
*/
|
|
226
410
|
setReadOnly( ns, 'numel', require( '@stdlib/ndarray-base-numel' ) );
|
|
227
411
|
|
|
412
|
+
/**
|
|
413
|
+
* @name outputPolicyEnum2Str
|
|
414
|
+
* @memberof ns
|
|
415
|
+
* @readonly
|
|
416
|
+
* @type {Function}
|
|
417
|
+
* @see {@link module:@stdlib/ndarray/base/output-policy-enum2str}
|
|
418
|
+
*/
|
|
419
|
+
setReadOnly( ns, 'outputPolicyEnum2Str', require( '@stdlib/ndarray-base-output-policy-enum2str' ) );
|
|
420
|
+
|
|
421
|
+
/**
|
|
422
|
+
* @name outputPolicyResolveEnum
|
|
423
|
+
* @memberof ns
|
|
424
|
+
* @readonly
|
|
425
|
+
* @type {Function}
|
|
426
|
+
* @see {@link module:@stdlib/ndarray/base/output-policy-resolve-enum}
|
|
427
|
+
*/
|
|
428
|
+
setReadOnly( ns, 'outputPolicyResolveEnum', require( '@stdlib/ndarray-base-output-policy-resolve-enum' ) );
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* @name outputPolicyResolveStr
|
|
432
|
+
* @memberof ns
|
|
433
|
+
* @readonly
|
|
434
|
+
* @type {Function}
|
|
435
|
+
* @see {@link module:@stdlib/ndarray/base/output-policy-resolve-str}
|
|
436
|
+
*/
|
|
437
|
+
setReadOnly( ns, 'outputPolicyResolveStr', require( '@stdlib/ndarray-base-output-policy-resolve-str' ) );
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* @name outputPolicyStr2Enum
|
|
441
|
+
* @memberof ns
|
|
442
|
+
* @readonly
|
|
443
|
+
* @type {Function}
|
|
444
|
+
* @see {@link module:@stdlib/ndarray/base/output-policy-str2enum}
|
|
445
|
+
*/
|
|
446
|
+
setReadOnly( ns, 'outputPolicyStr2Enum', require( '@stdlib/ndarray-base-output-policy-str2enum' ) );
|
|
447
|
+
|
|
448
|
+
/**
|
|
449
|
+
* @name prependSingletonDimensions
|
|
450
|
+
* @memberof ns
|
|
451
|
+
* @readonly
|
|
452
|
+
* @type {Function}
|
|
453
|
+
* @see {@link module:@stdlib/ndarray/base/prepend-singleton-dimensions}
|
|
454
|
+
*/
|
|
455
|
+
setReadOnly( ns, 'prependSingletonDimensions', require( '@stdlib/ndarray-base-prepend-singleton-dimensions' ) );
|
|
456
|
+
|
|
457
|
+
/**
|
|
458
|
+
* @name removeSingletonDimensions
|
|
459
|
+
* @memberof ns
|
|
460
|
+
* @readonly
|
|
461
|
+
* @type {Function}
|
|
462
|
+
* @see {@link module:@stdlib/ndarray/base/remove-singleton-dimensions}
|
|
463
|
+
*/
|
|
464
|
+
setReadOnly( ns, 'removeSingletonDimensions', require( '@stdlib/ndarray-base-remove-singleton-dimensions' ) );
|
|
465
|
+
|
|
228
466
|
/**
|
|
229
467
|
* @name serializeMetaData
|
|
230
468
|
* @memberof ns
|
|
@@ -288,6 +526,60 @@ setReadOnly( ns, 'sub2ind', require( '@stdlib/ndarray-base-sub2ind' ) );
|
|
|
288
526
|
*/
|
|
289
527
|
setReadOnly( ns, 'ndarray2array', require( '@stdlib/ndarray-base-to-array' ) );
|
|
290
528
|
|
|
529
|
+
/**
|
|
530
|
+
* @name transpose
|
|
531
|
+
* @memberof ns
|
|
532
|
+
* @readonly
|
|
533
|
+
* @type {Function}
|
|
534
|
+
* @see {@link module:@stdlib/ndarray/base/transpose}
|
|
535
|
+
*/
|
|
536
|
+
setReadOnly( ns, 'transpose', require( '@stdlib/ndarray-base-transpose' ) );
|
|
537
|
+
|
|
538
|
+
/**
|
|
539
|
+
* @name unary
|
|
540
|
+
* @memberof ns
|
|
541
|
+
* @readonly
|
|
542
|
+
* @type {Function}
|
|
543
|
+
* @see {@link module:@stdlib/ndarray/base/unary}
|
|
544
|
+
*/
|
|
545
|
+
setReadOnly( ns, 'unary', require( '@stdlib/ndarray-base-unary' ) );
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* @name unaryBy
|
|
549
|
+
* @memberof ns
|
|
550
|
+
* @readonly
|
|
551
|
+
* @type {Function}
|
|
552
|
+
* @see {@link module:@stdlib/ndarray/base/unary-by}
|
|
553
|
+
*/
|
|
554
|
+
setReadOnly( ns, 'unaryBy', require( '@stdlib/ndarray-base-unary-by' ) );
|
|
555
|
+
|
|
556
|
+
/**
|
|
557
|
+
* @name unaryLoopOrder
|
|
558
|
+
* @memberof ns
|
|
559
|
+
* @readonly
|
|
560
|
+
* @type {Function}
|
|
561
|
+
* @see {@link module:@stdlib/ndarray/base/unary-loop-interchange-order}
|
|
562
|
+
*/
|
|
563
|
+
setReadOnly( ns, 'unaryLoopOrder', require( '@stdlib/ndarray-base-unary-loop-interchange-order' ) );
|
|
564
|
+
|
|
565
|
+
/**
|
|
566
|
+
* @name unaryOutputDataType
|
|
567
|
+
* @memberof ns
|
|
568
|
+
* @readonly
|
|
569
|
+
* @type {Function}
|
|
570
|
+
* @see {@link module:@stdlib/ndarray/base/unary-output-dtype}
|
|
571
|
+
*/
|
|
572
|
+
setReadOnly( ns, 'unaryOutputDataType', require( '@stdlib/ndarray-base-unary-output-dtype' ) );
|
|
573
|
+
|
|
574
|
+
/**
|
|
575
|
+
* @name unaryBlockSize
|
|
576
|
+
* @memberof ns
|
|
577
|
+
* @readonly
|
|
578
|
+
* @type {Function}
|
|
579
|
+
* @see {@link module:@stdlib/ndarray/base/unary-tiling-block-size}
|
|
580
|
+
*/
|
|
581
|
+
setReadOnly( ns, 'unaryBlockSize', require( '@stdlib/ndarray-base-unary-tiling-block-size' ) );
|
|
582
|
+
|
|
291
583
|
/**
|
|
292
584
|
* @name vind2bind
|
|
293
585
|
* @memberof ns
|
|
@@ -306,6 +598,24 @@ setReadOnly( ns, 'vind2bind', require( '@stdlib/ndarray-base-vind2bind' ) );
|
|
|
306
598
|
*/
|
|
307
599
|
setReadOnly( ns, 'wrapIndex', require( '@stdlib/ndarray-base-wrap-index' ) );
|
|
308
600
|
|
|
601
|
+
/**
|
|
602
|
+
* @name zeros
|
|
603
|
+
* @memberof ns
|
|
604
|
+
* @readonly
|
|
605
|
+
* @type {Function}
|
|
606
|
+
* @see {@link module:@stdlib/ndarray/base/zeros}
|
|
607
|
+
*/
|
|
608
|
+
setReadOnly( ns, 'zeros', require( '@stdlib/ndarray-base-zeros' ) );
|
|
609
|
+
|
|
610
|
+
/**
|
|
611
|
+
* @name zerosLike
|
|
612
|
+
* @memberof ns
|
|
613
|
+
* @readonly
|
|
614
|
+
* @type {Function}
|
|
615
|
+
* @see {@link module:@stdlib/ndarray/base/zeros-like}
|
|
616
|
+
*/
|
|
617
|
+
setReadOnly( ns, 'zerosLike', require( '@stdlib/ndarray-base-zeros-like' ) );
|
|
618
|
+
|
|
309
619
|
|
|
310
620
|
// EXPORTS //
|
|
311
621
|
|