diff --git a/lib/node_modules/@stdlib/blas/ext/circshift/lib/main.js b/lib/node_modules/@stdlib/blas/ext/circshift/lib/main.js index c83f975c12c5..d9e7de2d64ac 100644 --- a/lib/node_modules/@stdlib/blas/ext/circshift/lib/main.js +++ b/lib/node_modules/@stdlib/blas/ext/circshift/lib/main.js @@ -53,6 +53,7 @@ var DEFAULT_DTYPE = defaults.get( 'dtypes.integer' ); * @throws {RangeError} dimension indices must not exceed input ndarray bounds * @throws {RangeError} number of dimension indices must not exceed the number of input ndarray dimensions * @throws {Error} must provide valid options +* @throws {Error} second argument must be broadcast-compatible with the non-core dimensions of the first argument * @returns {ndarray} input ndarray * * @example @@ -86,7 +87,7 @@ function circshift( x, k ) { // 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 ) ); } @@ -108,7 +109,7 @@ function circshift( x, k ) { 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 ) );