Skip to content

Commit 8f1e45e

Browse files
committed
Auto-generated commit
1 parent 8f6f7b8 commit 8f1e45e

File tree

23 files changed

+209
-131
lines changed

23 files changed

+209
-131
lines changed

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<section class="release" id="unreleased">
66

7-
## Unreleased (2026-04-07)
7+
## Unreleased (2026-04-08)
88

99
<section class="features">
1010

@@ -820,7 +820,16 @@ A total of 45 issues were closed in this release:
820820

821821
<details>
822822

823+
- [`c8df03c`](https://github.com/stdlib-js/stdlib/commit/c8df03cfe4cb5362cfff5f981aff4c0abc6d0e5a) - **refactor:** add support for ancilliary ndarrays which decompose into subarrays _(by Athan Reines)_
824+
- [`da18a82`](https://github.com/stdlib-js/stdlib/commit/da18a821cb5b0e559658144a92a9fc1876d7345e) - **style:** reorder declarations _(by Athan Reines)_
823825
- [`bb0baff`](https://github.com/stdlib-js/stdlib/commit/bb0baff5acc1fbfa5f34b31045dde2ebd123c140) - **docs:** update namespace table of contents [(#11322)](https://github.com/stdlib-js/stdlib/pull/11322) _(by stdlib-bot)_
826+
- [`cdb2bb5`](https://github.com/stdlib-js/stdlib/commit/cdb2bb52a947ce276bc00e331f003dfeb14ec204) - **refactor:** normalize dtypes to enums to reduce memory consumption and speed-up comparisons _(by Athan Reines)_
827+
- [`8aae193`](https://github.com/stdlib-js/stdlib/commit/8aae19336b0cba0e5f7c35fd1fe792bc1264f907) - **docs:** update example and documented parameter types _(by Athan Reines)_
828+
- [`660d15d`](https://github.com/stdlib-js/stdlib/commit/660d15d41bad15389df2e9a1e591592ce54932b9) - **docs:** update example and documented parameter types _(by Athan Reines)_
829+
- [`26f1d6e`](https://github.com/stdlib-js/stdlib/commit/26f1d6e9227859c18102b50a0021ccf6d1963a1f) - **docs:** update example _(by Athan Reines)_
830+
- [`4d67d66`](https://github.com/stdlib-js/stdlib/commit/4d67d66c98fe74d756b277266e5f4fdabaae3039) - **docs:** update example _(by Athan Reines)_
831+
- [`edc94eb`](https://github.com/stdlib-js/stdlib/commit/edc94ebd0008c174362864f2fea40cefac495635) - **refactor:** add support for dtype instances and reduce memory requirements _(by Athan Reines)_
832+
- [`408c8be`](https://github.com/stdlib-js/stdlib/commit/408c8be00cf7c2139a5ff2dbab966db756d95944) - **refactor:** add support for dtype instances and reduce memory requirements _(by Athan Reines)_
824833
- [`aac0a2b`](https://github.com/stdlib-js/stdlib/commit/aac0a2be45cc8c0d70542b91d4ac3a958ea4881d) - **feat:** add `ndarray2string` to namespace _(by Athan Reines)_
825834
- [`47e4985`](https://github.com/stdlib-js/stdlib/commit/47e4985d18efb25b0fc00c6818fccdf547c9113e) - **feat:** add `ndarray/to-string` [(#10899)](https://github.com/stdlib-js/stdlib/pull/10899) _(by Muhammad Haris, Athan Reines, stdlib-bot)_
826835
- [`a467bf0`](https://github.com/stdlib-js/stdlib/commit/a467bf0083da8f346611e53a684a78212f76d426) - **chore:** fix typos and incorrect test values [(#11270)](https://github.com/stdlib-js/stdlib/pull/11270) _(by Philipp Burckhardt)_

base/binary-reduce-strided1d-dispatch/lib/main.js

Lines changed: 41 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,13 @@ var isFunctionArray = require( '@stdlib/assert/is-function-array' );
3333
var isDataType = require( './../../../base/assert/is-data-type' );
3434
var isOutputDataTypePolicy = require( './../../../base/assert/is-output-data-type-policy' );
3535
var isInputCastingPolicy = require( './../../../base/assert/is-input-casting-policy' );
36-
var isEqualDataType = require( './../../../base/assert/is-equal-data-type' );
3736
var contains = require( '@stdlib/array/base/assert/contains' );
3837
var binaryReduceStrided1d = require( './../../../base/binary-reduce-strided1d' );
3938
var binaryOutputDataType = require( './../../../base/binary-output-dtype' );
4039
var binaryInputCastingDataType = require( './../../../base/binary-input-casting-dtype' );
40+
var resolveEnum = require( './../../../base/dtype-resolve-enum' );
4141
var dtypes2enums = require( './../../../base/dtypes2enums' );
4242
var dtypes2strings = require( './../../../base/dtypes2strings' );
43-
var resolveStr = require( './../../../base/dtype-resolve-str' );
4443
var spreadDimensions = require( './../../../base/spread-dimensions' );
4544
var getShape = require( './../../../shape' ); // note: non-base accessor is intentional due to input ndarrays originating in userland
4645
var ndims = require( './../../../ndims' );
@@ -118,6 +117,8 @@ var DEFAULT_ORDER = defaults.get( 'order' );
118117
* // returns <ndarray>[ -5.0 ]
119118
*/
120119
function BinaryStrided1dDispatch( table, idtypes, odtypes, policies ) {
120+
var idt;
121+
var odt;
121122
var dt;
122123
var i;
123124
if ( !( this instanceof BinaryStrided1dDispatch ) ) {
@@ -138,7 +139,7 @@ function BinaryStrided1dDispatch( table, idtypes, odtypes, policies ) {
138139
if ( !isCollection( idtypes ) ) {
139140
throw new TypeError( format( 'invalid argument. Second argument must be an array-like object. Value: `%s`.', idtypes ) );
140141
}
141-
idtypes = copy( idtypes );
142+
idt = [];
142143
for ( i = 0; i < idtypes.length; i++ ) {
143144
dt = idtypes[ i ];
144145
if (
@@ -148,7 +149,7 @@ function BinaryStrided1dDispatch( table, idtypes, odtypes, policies ) {
148149
) {
149150
throw new TypeError( format( 'invalid argument. Second argument must contain arrays of data types. Value: `%s`.', idtypes ) );
150151
}
151-
idtypes[ i ] = dtypes2strings( dt );
152+
idt.push( dtypes2enums( dt ) ); // note: convert to enums (i.e., integers) to ensure faster comparisons and reduced storage requirements
152153
}
153154
if (
154155
!isCollection( odtypes ) ||
@@ -157,7 +158,7 @@ function BinaryStrided1dDispatch( table, idtypes, odtypes, policies ) {
157158
) {
158159
throw new TypeError( format( 'invalid argument. Third argument must be an array of data types. Value: `%s`.', odtypes ) );
159160
}
160-
odtypes = dtypes2strings( odtypes );
161+
odt = dtypes2enums( odtypes ); // note: convert to enums (i.e., integers) to ensure faster comparisons and reduced storage requirements
161162

162163
if ( !isObject( policies ) ) {
163164
throw new TypeError( format( 'invalid argument. Fourth argument must be an object. Value: `%s`.', table ) );
@@ -170,14 +171,14 @@ function BinaryStrided1dDispatch( table, idtypes, odtypes, policies ) {
170171
}
171172
this._table = {
172173
'default': table.default,
173-
'types': ( table.types ) ? dtypes2enums( table.types ) : [], // note: convert to enums (i.e., integers) to ensure faster comparisons
174+
'types': ( table.types ) ? dtypes2enums( table.types ) : [], // note: convert to enums (i.e., integers) to ensure faster comparisons and reduced storage requirements
174175
'fcns': ( table.fcns ) ? copy( table.fcns ) : []
175176
};
176177
if ( this._table.types.length !== 2 * this._table.fcns.length ) {
177178
throw new Error( 'invalid argument. First argument specifies an unexpected number of types. Two input ndarray data types must be specified for each provided strided function.' );
178179
}
179-
this._idtypes = idtypes;
180-
this._odtypes = odtypes;
180+
this._idtypes = idt;
181+
this._odtypes = odt;
181182
this._policies = {
182183
'output': policies.output,
183184
'casting': policies.casting
@@ -240,6 +241,8 @@ setReadOnly( BinaryStrided1dDispatch.prototype, 'apply', function apply( x, y )
240241
var ordx;
241242
var ordy;
242243
var ordz;
244+
var xdte;
245+
var ydte;
243246
var err;
244247
var idx;
245248
var shx;
@@ -265,12 +268,14 @@ setReadOnly( BinaryStrided1dDispatch.prototype, 'apply', function apply( x, y )
265268
throw new TypeError( format( 'invalid argument. Second argument must be an ndarray-like object. Value: `%s`.', y ) );
266269
}
267270
xdt = getDType( x );
268-
if ( !contains( this._idtypes[ 0 ], resolveStr( xdt ) ) ) {
269-
throw new TypeError( format( 'invalid argument. First argument must have one of the following data types: "%s". Data type: `%s`.', join( this._idtypes[ 0 ], '", "' ), xdt ) );
271+
xdte = resolveEnum( xdt );
272+
if ( !contains( this._idtypes[ 0 ], xdte ) ) {
273+
throw new TypeError( format( 'invalid argument. First argument must have one of the following data types: "%s". Data type: `%s`.', join( dtypes2strings( this._idtypes[ 0 ] ), '", "' ), xdt ) );
270274
}
271275
ydt = getDType( y );
272-
if ( !contains( this._idtypes[ 1 ], resolveStr( ydt ) ) ) {
273-
throw new TypeError( format( 'invalid argument. Second argument must have one of the following data types: "%s". Data type: `%s`.', join( this._idtypes[ 1 ], '", "' ), ydt ) );
276+
ydte = resolveEnum( ydt );
277+
if ( !contains( this._idtypes[ 1 ], ydte ) ) {
278+
throw new TypeError( format( 'invalid argument. Second argument must have one of the following data types: "%s". Data type: `%s`.', join( dtypes2strings( this._idtypes[ 1 ] ), '", "' ), ydt ) );
274279
}
275280
args = [ x, y ];
276281
for ( i = 2; i < nargs; i++ ) {
@@ -279,10 +284,10 @@ setReadOnly( BinaryStrided1dDispatch.prototype, 'apply', function apply( x, y )
279284
break;
280285
}
281286
dt = getDType( arr );
282-
if ( !contains( this._idtypes[ i ], resolveStr( dt ) ) ) {
283-
throw new TypeError( format( 'invalid argument. Argument %d must have one of the following data types: "%s". Data type: `%s`.', i, join( this._idtypes[ i ], '", "' ), dt ) );
287+
if ( !contains( this._idtypes[ i ], resolveEnum( dt ) ) ) {
288+
throw new TypeError( format( 'invalid argument. Argument %d must have one of the following data types: "%s". Data type: `%s`.', i, join( dtypes2strings( this._idtypes[ i ] ), '", "' ), dt ) );
284289
}
285-
// Note: we don't type promote additional ndarray arguments, as they are passed as scalars to the underlying strided reduction function...
290+
// Note: we don't type promote additional ndarray arguments...
286291
args.push( arr );
287292
}
288293
// If we didn't make it up until the last argument, this means that we found a non-options argument which was not an ndarray...
@@ -338,23 +343,23 @@ setReadOnly( BinaryStrided1dDispatch.prototype, 'apply', function apply( x, y )
338343

339344
// Determine whether we need to cast the input ndarrays...
340345
dt = binaryInputCastingDataType( xdt, ydt, zdt, this._policies.casting );
341-
if ( !isEqualDataType( xdt, dt ) ) {
342-
// TODO: replace the following logic with a call to `ndarray/base/(?maybe-)(cast|convert|copy)` or similar utility
346+
if ( xdte !== resolveEnum( dt ) ) {
347+
// TODO: consider replacing the following logic with a call to `ndarray/base/(?maybe-)(cast|convert)` or similar utility
343348
tmp = baseEmpty( dt, shx, ordx );
344349
assign( [ x, tmp ] );
345350
args[ 0 ] = tmp;
346351
xdt = dt;
347352
}
348353
dt = binaryInputCastingDataType( ydt, xdt, zdt, this._policies.casting );
349-
if ( !isEqualDataType( ydt, dt ) ) {
350-
// TODO: replace the following logic with a call to `ndarray/base/(?maybe-)(cast|convert|copy)` or similar utility
354+
if ( ydte !== resolveEnum( dt ) ) {
355+
// TODO: consider replacing the following logic with a call to `ndarray/base/(?maybe-)(cast|convert)` or similar utility
351356
tmp = baseEmpty( dt, shy, ordy );
352357
assign( [ y, tmp ] );
353358
args[ 1 ] = tmp;
354359
ydt = dt;
355360
}
356361
// Resolve the lower-level strided function satisfying the input ndarray data types:
357-
i = gindexOfRow( this._table.fcns.length, 2, this._table.types, 2, 1, 0, dtypes2enums( [ xdt, ydt ] ), 1, 0 ); // eslint-disable-line max-len
362+
i = gindexOfRow( this._table.fcns.length, 2, this._table.types, 2, 1, 0, [ xdte, ydte ], 1, 0 ); // eslint-disable-line max-len
358363
if ( i >= 0 ) {
359364
f = this._table.fcns[ i ];
360365
} else {
@@ -430,6 +435,8 @@ setReadOnly( BinaryStrided1dDispatch.prototype, 'assign', function assign( x, y
430435
var nargs;
431436
var opts;
432437
var args;
438+
var xdte;
439+
var ydte;
433440
var arr;
434441
var err;
435442
var flg;
@@ -455,12 +462,14 @@ setReadOnly( BinaryStrided1dDispatch.prototype, 'assign', function assign( x, y
455462
}
456463
// Validate the input ndarray data types in order to maintain similar behavior to `apply` above...
457464
xdt = getDType( x );
458-
if ( !contains( this._idtypes[ 0 ], resolveStr( xdt ) ) ) {
459-
throw new TypeError( format( 'invalid argument. First argument must have one of the following data types: "%s". Data type: `%s`.', join( this._idtypes[ 0 ], '", "' ), xdt ) );
465+
xdte = resolveEnum( xdt );
466+
if ( !contains( this._idtypes[ 0 ], xdte ) ) {
467+
throw new TypeError( format( 'invalid argument. First argument must have one of the following data types: "%s". Data type: `%s`.', join( dtypes2strings( this._idtypes[ 0 ] ), '", "' ), xdt ) );
460468
}
461469
ydt = getDType( y );
462-
if ( !contains( this._idtypes[ 1 ], resolveStr( ydt ) ) ) {
463-
throw new TypeError( format( 'invalid argument. Second argument must have one of the following data types: "%s". Data type: `%s`.', join( this._idtypes[ 1 ], '", "' ), ydt ) );
470+
ydte = resolveEnum( ydt );
471+
if ( !contains( this._idtypes[ 1 ], ydte ) ) {
472+
throw new TypeError( format( 'invalid argument. Second argument must have one of the following data types: "%s". Data type: `%s`.', join( dtypes2strings( this._idtypes[ 1 ] ), '", "' ), ydt ) );
464473
}
465474
// Verify that both input arrays have the same shape:
466475
shx = getShape( x );
@@ -500,11 +509,11 @@ setReadOnly( BinaryStrided1dDispatch.prototype, 'assign', function assign( x, y
500509
// Cache a reference to the output ndarray:
501510
z = args.pop();
502511

503-
// Verify that additional ndarray arguments have expected dtypes (note: we intentionally don't validate the output ndarray dtype in order to provide an escape hatch for a user wanting to have an output ndarray having a specific dtype that `apply` does not support; note: we don't type promote additional ndarray arguments, as they are passed as scalars to the underlying strided reduction function)...
512+
// Verify that additional ndarray arguments have expected dtypes (note: we intentionally don't validate the output ndarray dtype in order to provide an escape hatch for a user wanting to have an output ndarray having a specific dtype that `apply` does not support; note: we don't type promote additional ndarray arguments)...
504513
for ( i = 2; i < args.length; i++ ) {
505514
dt = getDType( args[ i ] );
506-
if ( !contains( this._idtypes[ i ], resolveStr( dt ) ) ) {
507-
throw new TypeError( format( 'invalid argument. Argument %d must have one of the following data types: "%s". Data type: `%s`.', i, join( this._idtypes[ i ], '", "' ), dt ) );
515+
if ( !contains( this._idtypes[ i ], resolveEnum( dt ) ) ) {
516+
throw new TypeError( format( 'invalid argument. Argument %d must have one of the following data types: "%s". Data type: `%s`.', i, join( dtypes2strings( this._idtypes[ i ] ), '", "' ), dt ) );
508517
}
509518
}
510519
// Validate any provided options...
@@ -523,23 +532,23 @@ setReadOnly( BinaryStrided1dDispatch.prototype, 'assign', function assign( x, y
523532
// Determine whether we need to cast the input ndarrays...
524533
zdt = getDType( z );
525534
dt = binaryInputCastingDataType( xdt, ydt, zdt, this._policies.casting );
526-
if ( !isEqualDataType( xdt, dt ) ) {
527-
// TODO: replace the following logic with a call to `ndarray/base/(?maybe-)(cast|convert|copy)` or similar utility
535+
if ( xdte !== resolveEnum( dt ) ) {
536+
// TODO: consider replacing the following logic with a call to `ndarray/base/(?maybe-)(cast|convert)` or similar utility
528537
tmp = baseEmpty( dt, shx, getOrder( x ) );
529538
assign( [ x, tmp ] );
530539
args[ 0 ] = tmp;
531540
xdt = dt;
532541
}
533542
dt = binaryInputCastingDataType( ydt, xdt, zdt, this._policies.casting );
534-
if ( !isEqualDataType( ydt, dt ) ) {
535-
// TODO: replace the following logic with a call to `ndarray/base/(?maybe-)(cast|convert|copy)` or similar utility
543+
if ( ydte !== resolveEnum( dt ) ) {
544+
// TODO: consider replacing the following logic with a call to `ndarray/base/(?maybe-)(cast|convert)` or similar utility
536545
tmp = baseEmpty( dt, shy, getOrder( y ) );
537546
assign( [ y, tmp ] );
538547
args[ 1 ] = tmp;
539548
ydt = dt;
540549
}
541550
// Resolve the lower-level strided function satisfying the input ndarray data type:
542-
i = gindexOfRow( this._table.fcns.length, 2, this._table.types, 2, 1, 0, dtypes2enums( [ xdt, ydt ] ), 1, 0 ); // eslint-disable-line max-len
551+
i = gindexOfRow( this._table.fcns.length, 2, this._table.types, 2, 1, 0, [ xdte, ydte ], 1, 0 ); // eslint-disable-line max-len
543552
if ( i >= 0 ) {
544553
f = this._table.fcns[ i ];
545554
} else {

base/binary-reduce-strided1d-dispatch/lib/validate.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ var isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
2626
var isIntegerArray = require( '@stdlib/assert/is-integer-array' ).primitives;
2727
var isEmptyCollection = require( '@stdlib/assert/is-empty-collection' );
2828
var normalizeIndices = require( './../../../base/to-unique-normalized-indices' );
29-
var resolveStr = require( './../../../base/dtype-resolve-str' );
29+
var resolveEnum = require( './../../../base/dtype-resolve-enum' );
30+
var dtypes2strings = require( './../../../base/dtypes2strings' );
3031
var join = require( '@stdlib/array/base/join' );
3132
var contains = require( '@stdlib/array/base/assert/contains' );
3233
var format = require( '@stdlib/string/format' );
@@ -85,9 +86,9 @@ function validate( opts, ndims, dtypes, options ) {
8586
opts.dims = tmp;
8687
}
8788
if ( hasOwnProp( options, 'dtype' ) ) {
88-
opts.dtype = resolveStr( options.dtype );
89-
if ( !contains( dtypes, opts.dtype ) ) {
90-
return new TypeError( format( 'invalid option. `%s` option must be one of the following: "%s". Option: `%s`.', 'dtype', join( dtypes, '", "' ), options.dtype ) );
89+
opts.dtype = options.dtype;
90+
if ( !contains( dtypes, resolveEnum( opts.dtype ) ) ) {
91+
return new TypeError( format( 'invalid option. `%s` option must be one of the following: "%s". Option: `%s`.', 'dtype', join( dtypes2strings( dtypes ), '", "' ), options.dtype ) );
9192
}
9293
}
9394
return null;

base/broadcast-shapes/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@
5656
* int8_t status = stdlib_ndarray_broadcast_shapes( 2, shapes, ndims, out );
5757
*/
5858
int8_t stdlib_ndarray_broadcast_shapes( const int64_t M, const int64_t *shapes[], const int64_t ndims[], int64_t *out ) {
59-
int64_t dim;
6059
const int64_t *sh;
60+
int64_t dim;
6161
int64_t n1;
6262
int64_t n2;
6363
int64_t d;

base/unary-reduce-strided1d-dispatch-by-factory/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ var opts = {
158158
var y = unary( x, opts, clbk );
159159
// returns <ndarray>
160160

161-
var dt = getDType( y );
161+
var dt = String( getDType( y ) );
162162
// returns 'float64'
163163
```
164164

base/unary-reduce-strided1d-dispatch-by-factory/docs/repl.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@
3131
- clbk: callback function to apply to each element of an input ndarray.
3232
- thisArg: callback function execution context.
3333

34-
idtypes: Array<Array<string>>
34+
idtypes: Array<Array<string|DataType>>
3535
List containing lists of supported input array data types for each input
3636
ndarray argument.
3737

38-
odtypes: Array<string>
38+
odtypes: Array<string|DataType>
3939
List of supported output array data types.
4040

4141
policies: Object
@@ -72,7 +72,7 @@ fcn( x[, ...args][, options], clbk[, thisArg] )
7272
options: Object (optional)
7373
Function options.
7474

75-
options.dtype: string (optional)
75+
options.dtype: string|DataType (optional)
7676
Output array data type. Setting this option overrides the output data
7777
type policy.
7878

base/unary-reduce-strided1d-dispatch-by-factory/lib/main.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ var UnaryStrided1dDispatchBy = require( './../../../base/unary-reduce-strided1d-
3131
*
3232
* @param {Object} table - dispatch table
3333
* @param {Function} table.default - default strided reduction function
34-
* @param {StringArray} [table.types] - one-dimensional list of ndarray data types describing specialized input ndarray argument signatures
34+
* @param {ArrayLikeObject} [table.types] - one-dimensional list of ndarray data types describing specialized input ndarray argument signatures
3535
* @param {ArrayLikeObject<Function>} [table.fcns] - list of strided reduction functions which are specific to specialized input ndarray argument signatures
36-
* @param {ArrayLikeObject<StringArray>} idtypes - list containing lists of supported input data types for each ndarray argument
37-
* @param {StringArray} odtypes - list of supported output data types
36+
* @param {ArrayLikeObject<ArrayLikeObject>} idtypes - list containing lists of supported input data types for each ndarray argument
37+
* @param {ArrayLikeObject} odtypes - list of supported output data types
3838
* @param {Object} policies - policies
3939
* @param {string} policies.output - output data type policy
4040
* @param {string} policies.casting - input ndarray casting policy
@@ -125,7 +125,7 @@ function factory( table, idtypes, odtypes, policies ) {
125125
* @param {Options} [options] - function options
126126
* @param {IntegerArray} [options.dims] - list of dimensions over which to perform a reduction
127127
* @param {boolean} [options.keepdims=false] - boolean indicating whether the reduced dimensions should be included in the returned ndarray as singleton dimensions
128-
* @param {string} [options.dtype] - output ndarray data type
128+
* @param {*} [options.dtype] - output ndarray data type
129129
* @param {Function} clbk - callback function
130130
* @param {*} [thisArg] - callback function execution context
131131
* @throws {TypeError} first argument must be an ndarray

base/unary-reduce-strided1d-dispatch-by/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ var opts = {
152152
var y = unary.apply( x, opts, clbk );
153153
// returns <ndarray>
154154

155-
var dt = getDType( y );
155+
var dt = String( getDType( y ) );
156156
// returns 'float64'
157157
```
158158

0 commit comments

Comments
 (0)