Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/blas/ext/circshift/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
var nonCoreShape = require( '@stdlib/ndarray/base/complement-shape' );
var getShape = require( '@stdlib/ndarray/shape' );
var getOrder = require( '@stdlib/ndarray/order' );
var defaults = require( '@stdlib/ndarray/defaults' );

Check warning on line 31 in lib/node_modules/@stdlib/blas/ext/circshift/lib/main.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

only the `get` property of the required module is used; require the property directly
var format = require( '@stdlib/string/format' );
var base = require( './base.js' );

Expand Down Expand Up @@ -81,12 +81,12 @@
if ( nargs === 2 ) {
// Case: circshift( x, k_scalar )
if ( isInteger( k ) ) {
return base( x, broadcastScalar( k, DEFAULT_DTYPE, [], getOrder( x ) ) );

Check warning on line 84 in lib/node_modules/@stdlib/blas/ext/circshift/lib/main.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

This line has a length of 85. Maximum allowed is 80
}
// Case: circshift( x, k_ndarray )
if ( isndarrayLike( k ) ) {
// As the operation is performed across all dimensions, `k` is assumed to be a zero-dimensional ndarray...
return base( x, k );
return base( x, maybeBroadcastArray( k, [] ) );
}
throw new TypeError( format( 'invalid argument. Second argument must be either an ndarray or an integer. Value: `%s`.', k ) );
}
Expand All @@ -108,7 +108,7 @@
if ( hasOwnProp( opts, 'dims' ) ) {
ka = maybeBroadcastArray( k, nonCoreShape( getShape( x ), opts.dims ) ); // eslint-disable-line max-len
} else {
ka = k;
ka = maybeBroadcastArray( k, [] );
}
} else {
throw new TypeError( format( 'invalid argument. Second argument must be either an ndarray or an integer. Value: `%s`.', k ) );
Expand Down
4 changes: 3 additions & 1 deletion lib/node_modules/@stdlib/blas/ext/sort/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ function sort( x ) {
// Case: sort( x, sortOrder_ndarray )
if ( isndarrayLike( o ) ) {
// As the operation is performed across all dimensions, `o` is assumed to be a zero-dimensional ndarray...
return base( x, o );
return base( x, maybeBroadcastArray( o, [] ) );
}
// Case: sort( x, opts )
opts = o;
Expand All @@ -204,6 +204,8 @@ function sort( x ) {
// When not provided `dims`, the operation is performed across all dimensions and `o` is assumed to be a zero-dimensional ndarray; when `dims` is provided, we need to broadcast `o` to match the shape of the non-core dimensions...
if ( hasOwnProp( opts, 'dims' ) ) {
o = maybeBroadcastArray( o, nonCoreShape( getShape( x ), opts.dims ) );
} else {
o = maybeBroadcastArray( o, [] );
}
} else {
throw new TypeError( format( 'invalid argument. Second argument must be either an ndarray, a numeric scalar value, or a supported string. Value: `%s`.', o ) );
Expand Down
4 changes: 3 additions & 1 deletion lib/node_modules/@stdlib/blas/ext/sorthp/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ function sorthp( x ) {
// Case: sorthp( x, sortOrder_ndarray )
if ( isndarrayLike( o ) ) {
// As the operation is performed across all dimensions, `o` is assumed to be a zero-dimensional ndarray...
return base( x, o );
return base( x, maybeBroadcastArray( o, [] ) );
}
// Case: sorthp( x, opts )
opts = o;
Expand All @@ -204,6 +204,8 @@ function sorthp( x ) {
// When not provided `dims`, the operation is performed across all dimensions and `o` is assumed to be a zero-dimensional ndarray; when `dims` is provided, we need to broadcast `o` to match the shape of the non-core dimensions...
if ( hasOwnProp( opts, 'dims' ) ) {
o = maybeBroadcastArray( o, nonCoreShape( getShape( x ), opts.dims ) );
} else {
o = maybeBroadcastArray( o, [] );
}
} else {
throw new TypeError( format( 'invalid argument. Second argument must be either an ndarray, a numeric scalar value, or a supported string. Value: `%s`.', o ) );
Expand Down