You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
throw new Error( format( 'invalid argument. The function must be provided an array of inputs or more than one separate input arguments and an output ndarray. Value: `%s`.', nargs ) );
436
+
throw new Error( format( 'invalid argument. The function must be provided an array of inputs or more than one separate input argument and an output ndarray. Value: `%s`.', nargs ) );
throw new Error( format( 'invalid argument. Output argument must be a one-dimensional ndarray. Value: `%s`.', out ) );
452
455
}
453
456
454
-
// Resolve the `dtype` and `order` of input ndarrays...
457
+
// Resolve the `dtype` and `order` of input ndarrays:
455
458
arrs = [];
456
459
for ( i = 0; i < args.length; i++ ) {
457
460
if ( isndarrayLike( args[ i ] ) ) {
458
461
d = ndims( args[ i ] );
459
462
if ( d > 1 ) {
460
-
throw new RangeError( format( 'invalid argument. The function must be provided a one-dimensional ndarray or a zero-dimensional ndarray.. Value: `%s`.', d ) );
463
+
throw new RangeError( format( 'invalid argument. The function must be provided a one-dimensional ndarray or a zero-dimensional ndarray. Value: `%s`.', d ) );
461
464
}
462
465
arrs.push( args[ i ] );
463
466
}
464
467
}
465
468
if ( arrs.length >= 1 ) {
466
469
dt = resolveDataTypes( arrs );
467
470
ord = resolveOrder( arrs );
471
+
} else {
472
+
dt = DEFAULT_DTYPE;
473
+
ord = DEFAULT_ORDER;
468
474
}
469
475
470
-
// Broadcast scalar or 0d ndarray inputs...
476
+
// Broadcast scalar or 0d ndarray inputs:
471
477
for ( i = 0; i < args.length; i++ ) {
472
478
if ( isndarrayLike( args[ i ] ) ) {
473
479
if ( ndims( args[ i ] ) === 0 ) {
474
480
args[ i ] = broadcastArray( args[ i ], [ 1 ] );
475
481
}
476
-
} else if ( !dt && !ord ) {
477
-
args[ i ] = broadcastScalar( args[ i ], DEFAULT_DTYPE, [ 1 ], DEFAULT_ORDER ); // eslint-disable-line max-len
482
+
} else if ( !dt <spanclass="branch-0 cbranch-no" title="branch not covered" >&& !ord </span>) <spanclass="branch-0 cbranch-no" title="branch not covered" >{</span>
483
+
<spanclass="cstat-no" title="statement not covered" > args[ i ] = broadcastScalar( args[ i ], DEFAULT_DTYPE, [ 1 ], DEFAULT_ORDER ); // eslint-disable-line max-len</span>
478
484
} else {
479
485
args[ i ] = broadcastScalar( args[ i ], dt, [ 1 ], ord );
480
486
}
481
487
}
482
-
return concat.assign( normalizeArrays( args ), out );
0 commit comments