diff --git a/lib/node_modules/@stdlib/blas/ext/base/gcircshift/README.md b/lib/node_modules/@stdlib/blas/ext/base/gcircshift/README.md
new file mode 100644
index 000000000000..4ef76aafc272
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/gcircshift/README.md
@@ -0,0 +1,165 @@
+
+
+# gcircshift
+
+> Circularly shift the elements of a strided array by a specified number of positions.
+
+
+
+## Usage
+
+```javascript
+var gcircshift = require( '@stdlib/blas/ext/base/gcircshift' );
+```
+
+#### gcircshift( N, k, x, strideX )
+
+Circularly shifts the elements of a strided array by a specified number of positions.
+
+```javascript
+var x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];
+
+gcircshift( x.length, 2, x, 1 );
+// x => [ 4.0, 5.0, 1.0, 2.0, 3.0 ]
+```
+
+The function has the following parameters:
+
+- **N**: number of indexed elements.
+- **k**: number of positions to shift.
+- **x**: input array.
+- **strideX**: stride length.
+
+The `N` and stride parameters determine which elements in the strided array are accessed at runtime. For example, to circularly shift every other element:
+
+```javascript
+var x = [ 1.0, 0.0, 2.0, 0.0, 3.0, 0.0, 4.0, 0.0 ];
+
+gcircshift( 4, 1, x, 2 );
+// x => [ 4.0, 0.0, 1.0, 0.0, 2.0, 0.0, 3.0, 0.0 ]
+```
+
+Note that indexing is relative to the first index. To introduce an offset, use [`typed array`][mdn-typed-array] views.
+
+```javascript
+var Float64Array = require( '@stdlib/array/float64' );
+
+// Initial array...
+var x0 = new Float64Array( [ 0.0, 1.0, 2.0, 3.0, 4.0, 5.0 ] );
+
+// Create an offset view...
+var x1 = new Float64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
+
+// Circularly shift elements in the view:
+gcircshift( 5, 2, x1, 1 );
+// x0 => [ 0.0, 4.0, 5.0, 1.0, 2.0, 3.0 ]
+```
+
+#### gcircshift.ndarray( N, k, x, strideX, offsetX )
+
+Circularly shifts the elements of a strided array by a specified number of positions using alternative indexing semantics.
+
+```javascript
+var x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];
+
+gcircshift.ndarray( x.length, 2, x, 1, 0 );
+// x => [ 4.0, 5.0, 1.0, 2.0, 3.0 ]
+```
+
+The function has the following additional parameters:
+
+- **offsetX**: starting index.
+
+While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying buffer, the offset parameter supports indexing semantics based on a starting index. For example, to access only the last three elements of the strided array:
+
+```javascript
+var x = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];
+
+gcircshift.ndarray( 3, 1, x, 1, x.length-3 );
+// x => [ 1.0, 2.0, 3.0, 6.0, 4.0, 5.0 ]
+```
+
+
+
+
+
+
+
+## Notes
+
+- If `N <= 0`, both functions return the strided array unchanged.
+- If `k` is a multiple of `N`, both functions return the strided array unchanged.
+- If `k > 0`, elements are shifted to the right.
+- If `k < 0`, elements are shifted to the left.
+- Depending on the environment, the typed versions ([`dcircshift`][@stdlib/blas/ext/base/dcircshift], [`scircshift`][@stdlib/blas/ext/base/scircshift], etc.) are likely to be significantly more performant.
+
+
+
+
+
+
+
+## Examples
+
+
+
+```javascript
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var gcircshift = require( '@stdlib/blas/ext/base/gcircshift' );
+
+var x = discreteUniform( 10, -100, 100, {
+ 'dtype': 'generic'
+});
+console.log( x );
+
+gcircshift( x.length, 3, x, 1 );
+console.log( x );
+```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+[@stdlib/blas/ext/base/dcircshift]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/ext/base/dcircshift
+
+[@stdlib/blas/ext/base/scircshift]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/ext/base/scircshift
+
+[mdn-typed-array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray
+
+
+
+
+
+
+
+
diff --git a/lib/node_modules/@stdlib/blas/ext/base/gcircshift/benchmark/benchmark.js b/lib/node_modules/@stdlib/blas/ext/base/gcircshift/benchmark/benchmark.js
new file mode 100644
index 000000000000..c31e78e95464
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/gcircshift/benchmark/benchmark.js
@@ -0,0 +1,100 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var uniform = require( '@stdlib/random/array/uniform' );
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var format = require( '@stdlib/string/format' );
+var pkg = require( './../package.json' ).name;
+var gcircshift = require( './../lib/main.js' );
+
+
+// FUNCTIONS //
+
+/**
+* Create a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - array length
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len ) {
+ var x = uniform( len, -100.0, 100.0, {
+ 'dtype': 'generic'
+ });
+ var k = floor( len / 2 );
+ return benchmark;
+
+ /**
+ * Benchmark function.
+ *
+ * @private
+ * @param {Benchmark} b - benchmark instance
+ */
+ function benchmark( b ) {
+ var y;
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ y = gcircshift( x.length, k, x, 1 );
+ if ( isnan( y[ i%x.length ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnan( y[ i%x.length ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+ }
+}
+
+
+// MAIN //
+
+/**
+* Main execution sequence.
+*
+* @private
+*/
+function main() {
+ var len;
+ var min;
+ var max;
+ var f;
+ var i;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+ f = createBenchmark( len );
+ bench( format( '%s:len=%d', pkg, len ), f );
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/blas/ext/base/gcircshift/benchmark/benchmark.ndarray.js b/lib/node_modules/@stdlib/blas/ext/base/gcircshift/benchmark/benchmark.ndarray.js
new file mode 100644
index 000000000000..0c9fe4455bde
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/gcircshift/benchmark/benchmark.ndarray.js
@@ -0,0 +1,100 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var uniform = require( '@stdlib/random/array/uniform' );
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var format = require( '@stdlib/string/format' );
+var pkg = require( './../package.json' ).name;
+var gcircshift = require( './../lib/ndarray.js' );
+
+
+// FUNCTIONS //
+
+/**
+* Create a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - array length
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len ) {
+ var x = uniform( len, -100.0, 100.0, {
+ 'dtype': 'generic'
+ });
+ var k = floor( len / 2 );
+ return benchmark;
+
+ /**
+ * Benchmark function.
+ *
+ * @private
+ * @param {Benchmark} b - benchmark instance
+ */
+ function benchmark( b ) {
+ var y;
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ y = gcircshift( x.length, k, x, 1, 0 );
+ if ( isnan( y[ i%x.length ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnan( y[ i%x.length ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+ }
+}
+
+
+// MAIN //
+
+/**
+* Main execution sequence.
+*
+* @private
+*/
+function main() {
+ var len;
+ var min;
+ var max;
+ var f;
+ var i;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+ f = createBenchmark( len );
+ bench( format( '%s:ndarray:len=%d', pkg, len ), f );
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/blas/ext/base/gcircshift/docs/repl.txt b/lib/node_modules/@stdlib/blas/ext/base/gcircshift/docs/repl.txt
new file mode 100644
index 000000000000..85048059efce
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/gcircshift/docs/repl.txt
@@ -0,0 +1,101 @@
+
+{{alias}}( N, k, x, strideX )
+ Circularly shifts the elements of a strided array by a specified number of
+ positions.
+
+ If `k > 0`, elements are shifted to the right. If `k < 0`, elements are
+ shifted to the left.
+
+ The `N` and stride parameters determine which elements in the strided array
+ are accessed at runtime.
+
+ Indexing is relative to the first index. To introduce an offset, use typed
+ array views.
+
+ If `N <= 0`, the function returns `x` unchanged.
+
+ Parameters
+ ----------
+ N: integer
+ Number of indexed elements.
+
+ k: integer
+ Number of positions to shift.
+
+ x: ArrayLikeObject
+ Input array.
+
+ strideX: integer
+ Stride length.
+
+ Returns
+ -------
+ x: ArrayLikeObject
+ Input array.
+
+ Examples
+ --------
+ // Standard Usage:
+ > var x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];
+ > {{alias}}( x.length, 2, x, 1 )
+ [ 4.0, 5.0, 1.0, 2.0, 3.0 ]
+
+ // Using `N` and stride parameters:
+ > x = [ 1.0, 0.0, 2.0, 0.0, 3.0, 0.0, 4.0, 0.0 ];
+ > {{alias}}( 4, 1, x, 2 )
+ [ 4.0, 0.0, 1.0, 0.0, 2.0, 0.0, 3.0, 0.0 ]
+
+ // Using view offsets:
+ > var x0 = new {{alias:@stdlib/array/float64}}( [ 0.0, 1.0, 2.0, 3.0, 4.0, 5.0 ] );
+ > var x1 = new {{alias:@stdlib/array/float64}}( x0.buffer, x0.BYTES_PER_ELEMENT*1 );
+ > {{alias}}( 5, 2, x1, 1 )
+ [ 4.0, 5.0, 1.0, 2.0, 3.0 ]
+ > x0
+ [ 0.0, 4.0, 5.0, 1.0, 2.0, 3.0 ]
+
+
+{{alias}}.ndarray( N, k, x, strideX, offsetX )
+ Circularly shifts the elements of a strided array by a specified number of
+ positions using alternative indexing semantics.
+
+ While typed array views mandate a view offset based on the underlying
+ buffer, the offset parameter supports indexing semantics based on a
+ starting index.
+
+ Parameters
+ ----------
+ N: integer
+ Number of indexed elements.
+
+ k: integer
+ Number of positions to shift.
+
+ x: ArrayLikeObject
+ Input array.
+
+ strideX: integer
+ Stride length.
+
+ offsetX: integer
+ Starting index.
+
+ Returns
+ -------
+ x: ArrayLikeObject
+ Input array.
+
+ Examples
+ --------
+ // Standard Usage:
+ > var x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];
+ > {{alias}}.ndarray( x.length, 2, x, 1, 0 )
+ [ 4.0, 5.0, 1.0, 2.0, 3.0 ]
+
+ // Using an index offset:
+ > x = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];
+ > {{alias}}.ndarray( 3, 1, x, 2, 1 )
+ [ 1.0, 6.0, 3.0, 2.0, 5.0, 4.0 ]
+
+ See Also
+ --------
+
diff --git a/lib/node_modules/@stdlib/blas/ext/base/gcircshift/docs/types/index.d.ts b/lib/node_modules/@stdlib/blas/ext/base/gcircshift/docs/types/index.d.ts
new file mode 100644
index 000000000000..14acdc0bcc5f
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/gcircshift/docs/types/index.d.ts
@@ -0,0 +1,91 @@
+/*
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+// TypeScript Version: 4.1
+
+///
+
+import { Collection } from '@stdlib/types/array';
+
+/**
+* Interface describing `gcircshift`.
+*/
+interface Routine {
+ /**
+ * Circularly shifts the elements of a strided array by a specified number of positions.
+ *
+ * @param N - number of indexed elements
+ * @param k - number of positions to shift
+ * @param x - input array
+ * @param strideX - stride length
+ * @returns `x`
+ *
+ * @example
+ * var x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];
+ *
+ * gcircshift( x.length, 2, x, 1 );
+ * // x => [ 4.0, 5.0, 1.0, 2.0, 3.0 ]
+ */
+ = Collection>( N: number, k: number, x: U, strideX: number ): U;
+
+ /**
+ * Circularly shifts the elements of a strided array by a specified number of positions using alternative indexing semantics.
+ *
+ * @param N - number of indexed elements
+ * @param k - number of positions to shift
+ * @param x - input array
+ * @param strideX - stride length
+ * @param offsetX - starting index
+ * @returns `x`
+ *
+ * @example
+ * var x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];
+ *
+ * gcircshift.ndarray( x.length, 2, x, 1, 0 );
+ * // x => [ 4.0, 5.0, 1.0, 2.0, 3.0 ]
+ */
+ ndarray = Collection>( N: number, k: number, x: U, strideX: number, offsetX: number ): U;
+}
+
+/**
+* Circularly shifts the elements of a strided array by a specified number of positions.
+*
+* @param N - number of indexed elements
+* @param k - number of positions to shift
+* @param x - input array
+* @param strideX - stride length
+* @returns `x`
+*
+* @example
+* var x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];
+*
+* gcircshift( x.length, 2, x, 1 );
+* // x => [ 4.0, 5.0, 1.0, 2.0, 3.0 ]
+*
+* @example
+* var x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];
+*
+* gcircshift.ndarray( x.length, 2, x, 1, 0 );
+* // x => [ 4.0, 5.0, 1.0, 2.0, 3.0 ]
+*/
+declare var gcircshift: Routine;
+
+
+// EXPORTS //
+
+export = gcircshift;
diff --git a/lib/node_modules/@stdlib/blas/ext/base/gcircshift/docs/types/test.ts b/lib/node_modules/@stdlib/blas/ext/base/gcircshift/docs/types/test.ts
new file mode 100644
index 000000000000..0a32935fbca7
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/gcircshift/docs/types/test.ts
@@ -0,0 +1,185 @@
+/*
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+import gcircshift = require( './index' );
+
+
+// TESTS //
+
+// The function returns a collection...
+{
+ const x = new Float64Array( 10 );
+
+ gcircshift( x.length, 2, x, 1 ); // $ExpectType Float64Array
+}
+
+// The compiler throws an error if the function is provided a first argument which is not a number...
+{
+ const x = new Float64Array( 10 );
+
+ gcircshift( '10', 2, x, 1 ); // $ExpectError
+ gcircshift( true, 2, x, 1 ); // $ExpectError
+ gcircshift( false, 2, x, 1 ); // $ExpectError
+ gcircshift( null, 2, x, 1 ); // $ExpectError
+ gcircshift( undefined, 2, x, 1 ); // $ExpectError
+ gcircshift( [], 2, x, 1 ); // $ExpectError
+ gcircshift( {}, 2, x, 1 ); // $ExpectError
+ gcircshift( ( x: number ): number => x, 2, x, 1 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a second argument which is not a number...
+{
+ const x = new Float64Array( 10 );
+
+ gcircshift( x.length, '10', x, 1 ); // $ExpectError
+ gcircshift( x.length, true, x, 1 ); // $ExpectError
+ gcircshift( x.length, false, x, 1 ); // $ExpectError
+ gcircshift( x.length, null, x, 1 ); // $ExpectError
+ gcircshift( x.length, undefined, x, 1 ); // $ExpectError
+ gcircshift( x.length, [], x, 1 ); // $ExpectError
+ gcircshift( x.length, {}, x, 1 ); // $ExpectError
+ gcircshift( x.length, ( x: number ): number => x, x, 1 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a third argument which is not a collection...
+{
+ const x = new Float64Array( 10 );
+
+ gcircshift( x.length, 2, '10', 1 ); // $ExpectError
+ gcircshift( x.length, 2, true, 1 ); // $ExpectError
+ gcircshift( x.length, 2, false, 1 ); // $ExpectError
+ gcircshift( x.length, 2, null, 1 ); // $ExpectError
+ gcircshift( x.length, 2, undefined, 1 ); // $ExpectError
+ gcircshift( x.length, 2, [], 1 ); // $ExpectError
+ gcircshift( x.length, 2, {}, 1 ); // $ExpectError
+ gcircshift( x.length, 2, ( x: number ): number => x, 1 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a fourth argument which is not a number...
+{
+ const x = new Float64Array( 10 );
+
+ gcircshift( x.length, 2, x, '10' ); // $ExpectError
+ gcircshift( x.length, 2, x, true ); // $ExpectError
+ gcircshift( x.length, 2, x, false ); // $ExpectError
+ gcircshift( x.length, 2, x, null ); // $ExpectError
+ gcircshift( x.length, 2, x, undefined ); // $ExpectError
+ gcircshift( x.length, 2, x, [] ); // $ExpectError
+ gcircshift( x.length, 2, x, {} ); // $ExpectError
+ gcircshift( x.length, 2, x, ( x: number ): number => x ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided an unsupported number of arguments...
+{
+ const x = new Float64Array( 10 );
+
+ gcircshift(); // $ExpectError
+ gcircshift( x.length ); // $ExpectError
+ gcircshift( x.length, 2 ); // $ExpectError
+ gcircshift( x.length, 2, x ); // $ExpectError
+ gcircshift( x.length, 2, x, 1, 10 ); // $ExpectError
+}
+
+// Attached to main export is an `ndarray` method which returns a collection...
+{
+ const x = new Float64Array( 10 );
+
+ gcircshift.ndarray( x.length, 2, x, 1, 0 ); // $ExpectType Float64Array
+}
+
+// The compiler throws an error if the `ndarray` method is provided a first argument which is not a number...
+{
+ const x = new Float64Array( 10 );
+
+ gcircshift.ndarray( '10', 2, x, 1, 0 ); // $ExpectError
+ gcircshift.ndarray( true, 2, x, 1, 0 ); // $ExpectError
+ gcircshift.ndarray( false, 2, x, 1, 0 ); // $ExpectError
+ gcircshift.ndarray( null, 2, x, 1, 0 ); // $ExpectError
+ gcircshift.ndarray( undefined, 2, x, 1, 0 ); // $ExpectError
+ gcircshift.ndarray( [], 2, x, 1, 0 ); // $ExpectError
+ gcircshift.ndarray( {}, 2, x, 1, 0 ); // $ExpectError
+ gcircshift.ndarray( ( x: number ): number => x, 2, x, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a second argument which is not a number...
+{
+ const x = new Float64Array( 10 );
+
+ gcircshift.ndarray( x.length, '10', x, 1, 0 ); // $ExpectError
+ gcircshift.ndarray( x.length, true, x, 1, 0 ); // $ExpectError
+ gcircshift.ndarray( x.length, false, x, 1, 0 ); // $ExpectError
+ gcircshift.ndarray( x.length, null, x, 1, 0 ); // $ExpectError
+ gcircshift.ndarray( x.length, undefined, x, 1, 0 ); // $ExpectError
+ gcircshift.ndarray( x.length, [], x, 1, 0 ); // $ExpectError
+ gcircshift.ndarray( x.length, {}, x, 1, 0 ); // $ExpectError
+ gcircshift.ndarray( x.length, ( x: number ): number => x, x, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a third argument which is not a collection...
+{
+ const x = new Float64Array( 10 );
+
+ gcircshift.ndarray( x.length, 2, '10', 1, 0 ); // $ExpectError
+ gcircshift.ndarray( x.length, 2, true, 1, 0 ); // $ExpectError
+ gcircshift.ndarray( x.length, 2, false, 1, 0 ); // $ExpectError
+ gcircshift.ndarray( x.length, 2, null, 1, 0 ); // $ExpectError
+ gcircshift.ndarray( x.length, 2, undefined, 1, 0 ); // $ExpectError
+ gcircshift.ndarray( x.length, 2, [], 1, 0 ); // $ExpectError
+ gcircshift.ndarray( x.length, 2, {}, 1, 0 ); // $ExpectError
+ gcircshift.ndarray( x.length, 2, ( x: number ): number => x, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a fourth argument which is not a number...
+{
+ const x = new Float64Array( 10 );
+
+ gcircshift.ndarray( x.length, 2, x, '10', 0 ); // $ExpectError
+ gcircshift.ndarray( x.length, 2, x, true, 0 ); // $ExpectError
+ gcircshift.ndarray( x.length, 2, x, false, 0 ); // $ExpectError
+ gcircshift.ndarray( x.length, 2, x, null, 0 ); // $ExpectError
+ gcircshift.ndarray( x.length, 2, x, undefined, 0 ); // $ExpectError
+ gcircshift.ndarray( x.length, 2, x, [], 0 ); // $ExpectError
+ gcircshift.ndarray( x.length, 2, x, {}, 0 ); // $ExpectError
+ gcircshift.ndarray( x.length, 2, x, ( x: number ): number => x, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a fifth argument which is not a number...
+{
+ const x = new Float64Array( 10 );
+
+ gcircshift.ndarray( x.length, 2, x, 1, '10' ); // $ExpectError
+ gcircshift.ndarray( x.length, 2, x, 1, true ); // $ExpectError
+ gcircshift.ndarray( x.length, 2, x, 1, false ); // $ExpectError
+ gcircshift.ndarray( x.length, 2, x, 1, null ); // $ExpectError
+ gcircshift.ndarray( x.length, 2, x, 1, undefined ); // $ExpectError
+ gcircshift.ndarray( x.length, 2, x, 1, [] ); // $ExpectError
+ gcircshift.ndarray( x.length, 2, x, 1, {} ); // $ExpectError
+ gcircshift.ndarray( x.length, 2, x, 1, ( x: number ): number => x ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided an unsupported number of arguments...
+{
+ const x = new Float64Array( 10 );
+
+ gcircshift.ndarray(); // $ExpectError
+ gcircshift.ndarray( x.length ); // $ExpectError
+ gcircshift.ndarray( x.length, 2 ); // $ExpectError
+ gcircshift.ndarray( x.length, 2, x ); // $ExpectError
+ gcircshift.ndarray( x.length, 2, x, 1 ); // $ExpectError
+ gcircshift.ndarray( x.length, 2, x, 1, 0, 10 ); // $ExpectError
+}
diff --git a/lib/node_modules/@stdlib/blas/ext/base/gcircshift/examples/index.js b/lib/node_modules/@stdlib/blas/ext/base/gcircshift/examples/index.js
new file mode 100644
index 000000000000..969acc6a80b7
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/gcircshift/examples/index.js
@@ -0,0 +1,30 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var gcircshift = require( './../lib' );
+
+var x = discreteUniform( 10, -100, 100, {
+ 'dtype': 'generic'
+});
+console.log( x );
+
+gcircshift( x.length, 3, x, 1 );
+console.log( x );
diff --git a/lib/node_modules/@stdlib/blas/ext/base/gcircshift/lib/accessors.js b/lib/node_modules/@stdlib/blas/ext/base/gcircshift/lib/accessors.js
new file mode 100644
index 000000000000..ee58eb49825d
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/gcircshift/lib/accessors.js
@@ -0,0 +1,168 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var floor = require( '@stdlib/math/base/special/floor' );
+
+
+// MAIN //
+
+/**
+* Circularly shifts the elements of a strided array by a specified number of positions.
+*
+* ## Notes
+*
+* - This implementation is based on the "trinity rotation" (a.k.a., conjoined triple reversal) algorithm introduced in , by Igor van den Hoven.
+*
+* @private
+* @param {PositiveInteger} N - number of indexed elements
+* @param {integer} k - number of positions to shift
+* @param {Object} x - input array object
+* @param {Collection} x.data - input array data
+* @param {Array} x.accessors - array element accessors
+* @param {integer} strideX - stride length
+* @param {NonNegativeInteger} offsetX - starting index
+* @returns {Object} input array object
+*/
+function gcircshift( N, k, x, strideX, offsetX ) {
+ var right;
+ var left;
+ var xbuf;
+ var tmp;
+ var set;
+ var get;
+ var pa;
+ var pb;
+ var pc;
+ var pd;
+ var n;
+ var s;
+ var i;
+
+ // Cache reference to array data:
+ xbuf = x.data;
+
+ // Cache a reference to the element accessors:
+ get = x.accessors[ 0 ];
+ set = x.accessors[ 1 ];
+
+ s = strideX;
+
+ // For a right circular shift by `k`, the left partition has `N-k` elements...
+ left = N - k;
+ right = k;
+ if ( left < right ) {
+ pa = offsetX;
+ pb = pa + ( left * s );
+ pc = pb;
+ pd = pb + ( right * s );
+
+ // Four-way swap from both ends and the split point...
+ n = floor( left / 2 );
+ for ( i = 0; i < n; i++ ) {
+ pb -= s;
+ pd -= s;
+ tmp = get( xbuf, pb );
+ set( xbuf, pb, get( xbuf, pa ) );
+ set( xbuf, pa, get( xbuf, pc ) );
+ set( xbuf, pc, get( xbuf, pd ) );
+ set( xbuf, pd, tmp );
+ pa += s;
+ pc += s;
+ }
+ // Three-way rotation for the remaining bridge...
+ n = floor( ( ( pd - pc ) / s ) / 2 );
+ for ( i = 0; i < n; i++ ) {
+ pd -= s;
+ tmp = get( xbuf, pc );
+ set( xbuf, pc, get( xbuf, pd ) );
+ set( xbuf, pd, get( xbuf, pa ) );
+ set( xbuf, pa, tmp );
+ pa += s;
+ pc += s;
+ }
+ // Standard reversal of any remaining elements...
+ n = floor( ( ( pd - pa ) / s ) / 2 );
+ for ( i = 0; i < n; i++ ) {
+ pd -= s;
+ tmp = get( xbuf, pa );
+ set( xbuf, pa, get( xbuf, pd ) );
+ set( xbuf, pd, tmp );
+ pa += s;
+ }
+ } else if ( left > right ) {
+ pa = offsetX;
+ pb = pa + ( left * s );
+ pc = pb;
+ pd = pb + ( right * s );
+
+ // Four-way swap from both ends and the split point...
+ n = floor( right / 2 );
+ for ( i = 0; i < n; i++ ) {
+ pb -= s;
+ pd -= s;
+ tmp = get( xbuf, pb );
+ set( xbuf, pb, get( xbuf, pa ) );
+ set( xbuf, pa, get( xbuf, pc ) );
+ set( xbuf, pc, get( xbuf, pd ) );
+ set( xbuf, pd, tmp );
+ pa += s;
+ pc += s;
+ }
+ // Three-way rotation for the remaining bridge...
+ n = floor( ( ( pb - pa ) / s ) / 2 );
+ for ( i = 0; i < n; i++ ) {
+ pb -= s;
+ pd -= s;
+ tmp = get( xbuf, pb );
+ set( xbuf, pb, get( xbuf, pa ) );
+ set( xbuf, pa, get( xbuf, pd ) );
+ set( xbuf, pd, tmp );
+ pa += s;
+ }
+ // Standard reversal of any remaining elements...
+ n = floor( ( ( pd - pa ) / s ) / 2 );
+ for ( i = 0; i < n; i++ ) {
+ pd -= s;
+ tmp = get( xbuf, pa );
+ set( xbuf, pa, get( xbuf, pd ) );
+ set( xbuf, pd, tmp );
+ pa += s;
+ }
+ } else {
+ // Simple pairwise swap...
+ pa = offsetX;
+ pb = pa + ( left * s );
+ for ( i = 0; i < left; i++ ) {
+ tmp = get( xbuf, pa );
+ set( xbuf, pa, get( xbuf, pb ) );
+ set( xbuf, pb, tmp );
+ pa += s;
+ pb += s;
+ }
+ }
+ return x;
+}
+
+
+// EXPORTS //
+
+module.exports = gcircshift;
diff --git a/lib/node_modules/@stdlib/blas/ext/base/gcircshift/lib/index.js b/lib/node_modules/@stdlib/blas/ext/base/gcircshift/lib/index.js
new file mode 100644
index 000000000000..657ac9e78871
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/gcircshift/lib/index.js
@@ -0,0 +1,57 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+/**
+* Circularly shift the elements of a strided array by a specified number of positions.
+*
+* @module @stdlib/blas/ext/base/gcircshift
+*
+* @example
+* var gcircshift = require( '@stdlib/blas/ext/base/gcircshift' );
+*
+* var x = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];
+*
+* gcircshift( x.length, 2, x, 1 );
+* // x => [ 5.0, 6.0, 1.0, 2.0, 3.0, 4.0 ]
+*
+* @example
+* var gcircshift = require( '@stdlib/blas/ext/base/gcircshift' );
+*
+* var x = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];
+*
+* gcircshift.ndarray( x.length, 2, x, 1, 0 );
+* // x => [ 5.0, 6.0, 1.0, 2.0, 3.0, 4.0 ]
+*/
+
+// MODULES //
+
+var setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );
+var main = require( './main.js' );
+var ndarray = require( './ndarray.js' );
+
+
+// MAIN //
+
+setReadOnly( main, 'ndarray', ndarray );
+
+
+// EXPORTS //
+
+module.exports = main;
diff --git a/lib/node_modules/@stdlib/blas/ext/base/gcircshift/lib/main.js b/lib/node_modules/@stdlib/blas/ext/base/gcircshift/lib/main.js
new file mode 100644
index 000000000000..30d496b4ce51
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/gcircshift/lib/main.js
@@ -0,0 +1,51 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var stride2offset = require( '@stdlib/strided/base/stride2offset' );
+var ndarray = require( './ndarray.js' );
+
+
+// MAIN //
+
+/**
+* Circularly shifts the elements of a strided array by a specified number of positions.
+*
+* @param {PositiveInteger} N - number of indexed elements
+* @param {integer} k - number of positions to shift
+* @param {Collection} x - input array
+* @param {integer} strideX - stride length
+* @returns {Collection} input array
+*
+* @example
+* var x = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];
+*
+* gcircshift( x.length, 2, x, 1 );
+* // x => [ 5.0, 6.0, 1.0, 2.0, 3.0, 4.0 ]
+*/
+function gcircshift( N, k, x, strideX ) {
+ return ndarray( N, k, x, strideX, stride2offset( N, strideX ) );
+}
+
+
+// EXPORTS //
+
+module.exports = gcircshift;
diff --git a/lib/node_modules/@stdlib/blas/ext/base/gcircshift/lib/ndarray.js b/lib/node_modules/@stdlib/blas/ext/base/gcircshift/lib/ndarray.js
new file mode 100644
index 000000000000..c93409517cbb
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/gcircshift/lib/ndarray.js
@@ -0,0 +1,180 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var floor = require( '@stdlib/math/base/special/floor' );
+var arraylike2object = require( '@stdlib/array/base/arraylike2object' );
+var accessors = require( './accessors.js' );
+
+
+// MAIN //
+
+/**
+* Circularly shifts the elements of a strided array by a specified number of positions.
+*
+* ## Notes
+*
+* - This implementation is based on the "trinity rotation" (a.k.a., conjoined triple reversal) algorithm introduced in , by Igor van den Hoven.
+*
+* @param {PositiveInteger} N - number of indexed elements
+* @param {integer} k - number of positions to shift
+* @param {Collection} x - input array
+* @param {integer} strideX - stride length
+* @param {NonNegativeInteger} offsetX - starting index
+* @returns {Collection} input array
+*
+* @example
+* var x = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];
+*
+* gcircshift( x.length, 2, x, 1, 0 );
+* // x => [ 5.0, 6.0, 1.0, 2.0, 3.0, 4.0 ]
+*/
+function gcircshift( N, k, x, strideX, offsetX ) {
+ var right;
+ var left;
+ var tmp;
+ var pa;
+ var pb;
+ var pc;
+ var pd;
+ var o;
+ var n;
+ var s;
+ var i;
+
+ if ( N <= 0 ) {
+ return x;
+ }
+ // Normalize `k`:
+ k %= N;
+ if ( k < 0 ) {
+ k += N;
+ }
+ if ( k === 0 ) {
+ return x;
+ }
+ o = arraylike2object( x );
+ if ( o.accessorProtocol ) {
+ accessors( N, k, o, strideX, offsetX );
+ return o.data;
+ }
+ s = strideX;
+
+ // For a right circular shift by `k`, the left partition has `N-k` elements...
+ left = N - k;
+ right = k;
+ if ( left < right ) {
+ pa = offsetX;
+ pb = pa + ( left * s );
+ pc = pb;
+ pd = pb + ( right * s );
+
+ // Four-way swap from both ends and the split point...
+ n = floor( left / 2 );
+ for ( i = 0; i < n; i++ ) {
+ pb -= s;
+ pd -= s;
+ tmp = x[ pb ];
+ x[ pb ] = x[ pa ];
+ x[ pa ] = x[ pc ];
+ x[ pc ] = x[ pd ];
+ x[ pd ] = tmp;
+ pa += s;
+ pc += s;
+ }
+ // Three-way rotation for the remaining bridge...
+ n = floor( ( ( pd - pc ) / s ) / 2 );
+ for ( i = 0; i < n; i++ ) {
+ pd -= s;
+ tmp = x[ pc ];
+ x[ pc ] = x[ pd ];
+ x[ pd ] = x[ pa ];
+ x[ pa ] = tmp;
+ pa += s;
+ pc += s;
+ }
+ // Standard reversal of any remaining elements...
+ n = floor( ( ( pd - pa ) / s ) / 2 );
+ for ( i = 0; i < n; i++ ) {
+ pd -= s;
+ tmp = x[ pa ];
+ x[ pa ] = x[ pd ];
+ x[ pd ] = tmp;
+ pa += s;
+ }
+ } else if ( left > right ) {
+ pa = offsetX;
+ pb = pa + ( left * s );
+ pc = pb;
+ pd = pb + ( right * s );
+
+ // Four-way swap from both ends and the split point...
+ n = floor( right / 2 );
+ for ( i = 0; i < n; i++ ) {
+ pb -= s;
+ pd -= s;
+ tmp = x[ pb ];
+ x[ pb ] = x[ pa ];
+ x[ pa ] = x[ pc ];
+ x[ pc ] = x[ pd ];
+ x[ pd ] = tmp;
+ pa += s;
+ pc += s;
+ }
+ // Three-way rotation for the remaining bridge...
+ n = floor( ( ( pb - pa ) / s ) / 2 );
+ for ( i = 0; i < n; i++ ) {
+ pb -= s;
+ pd -= s;
+ tmp = x[ pb ];
+ x[ pb ] = x[ pa ];
+ x[ pa ] = x[ pd ];
+ x[ pd ] = tmp;
+ pa += s;
+ }
+ // Standard reversal of any remaining elements...
+ n = floor( ( ( pd - pa ) / s ) / 2 );
+ for ( i = 0; i < n; i++ ) {
+ pd -= s;
+ tmp = x[ pa ];
+ x[ pa ] = x[ pd ];
+ x[ pd ] = tmp;
+ pa += s;
+ }
+ } else {
+ // Simple pairwise swap...
+ pa = offsetX;
+ pb = pa + ( left * s );
+ for ( i = 0; i < left; i++ ) {
+ tmp = x[ pa ];
+ x[ pa ] = x[ pb ];
+ x[ pb ] = tmp;
+ pa += s;
+ pb += s;
+ }
+ }
+ return x;
+}
+
+
+// EXPORTS //
+
+module.exports = gcircshift;
diff --git a/lib/node_modules/@stdlib/blas/ext/base/gcircshift/package.json b/lib/node_modules/@stdlib/blas/ext/base/gcircshift/package.json
new file mode 100644
index 000000000000..510e16c9715d
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/gcircshift/package.json
@@ -0,0 +1,68 @@
+{
+ "name": "@stdlib/blas/ext/base/gcircshift",
+ "version": "0.0.0",
+ "description": "Circularly shift the elements of a strided array by a specified number of positions.",
+ "license": "Apache-2.0",
+ "author": {
+ "name": "The Stdlib Authors",
+ "url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
+ },
+ "contributors": [
+ {
+ "name": "The Stdlib Authors",
+ "url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
+ }
+ ],
+ "main": "./lib",
+ "directories": {
+ "benchmark": "./benchmark",
+ "doc": "./docs",
+ "example": "./examples",
+ "lib": "./lib",
+ "test": "./test"
+ },
+ "types": "./docs/types",
+ "scripts": {},
+ "homepage": "https://github.com/stdlib-js/stdlib",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/stdlib-js/stdlib.git"
+ },
+ "bugs": {
+ "url": "https://github.com/stdlib-js/stdlib/issues"
+ },
+ "dependencies": {},
+ "devDependencies": {},
+ "engines": {
+ "node": ">=0.10.0",
+ "npm": ">2.7.0"
+ },
+ "os": [
+ "aix",
+ "darwin",
+ "freebsd",
+ "linux",
+ "macos",
+ "openbsd",
+ "sunos",
+ "win32",
+ "windows"
+ ],
+ "keywords": [
+ "stdlib",
+ "stdmath",
+ "mathematics",
+ "math",
+ "blas",
+ "extended",
+ "circular",
+ "shift",
+ "circshift",
+ "rotate",
+ "roll",
+ "strided",
+ "array",
+ "ndarray"
+ ],
+ "__stdlib__": {}
+}
diff --git a/lib/node_modules/@stdlib/blas/ext/base/gcircshift/test/test.js b/lib/node_modules/@stdlib/blas/ext/base/gcircshift/test/test.js
new file mode 100644
index 000000000000..0e31dcb58012
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/gcircshift/test/test.js
@@ -0,0 +1,38 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var tape = require( 'tape' );
+var gcircshift = require( './../lib' );
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof gcircshift, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'attached to the main export is a method providing an ndarray interface', function test( t ) {
+ t.strictEqual( typeof gcircshift.ndarray, 'function', 'method is a function' );
+ t.end();
+});
diff --git a/lib/node_modules/@stdlib/blas/ext/base/gcircshift/test/test.main.js b/lib/node_modules/@stdlib/blas/ext/base/gcircshift/test/test.main.js
new file mode 100644
index 000000000000..28df9d3f0e77
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/gcircshift/test/test.main.js
@@ -0,0 +1,312 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var tape = require( 'tape' );
+var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );
+var Float64Array = require( '@stdlib/array/float64' );
+var gcircshift = require( './../lib' );
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof gcircshift, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the function has an arity of 4', function test( t ) {
+ t.strictEqual( gcircshift.length, 4, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function returns a reference to the input array', function test( t ) {
+ var out;
+ var x;
+
+ x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];
+ out = gcircshift( x.length, 2, x, 1 );
+
+ t.strictEqual( out, x, 'same reference' );
+ t.end();
+});
+
+tape( 'if provided an `N` parameter less than or equal to `0`, the function returns the input array unchanged', function test( t ) {
+ var expected;
+ var x;
+
+ x = [ 3.0, -4.0, 1.0 ];
+ expected = [ 3.0, -4.0, 1.0 ];
+
+ gcircshift( 0, 1, x, 1 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ gcircshift( -4, 1, x, 1 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function performs a circular shift (right shift, positive k)', function test( t ) {
+ var expected;
+ var x;
+
+ x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];
+ expected = [ 4.0, 5.0, 1.0, 2.0, 3.0 ];
+
+ gcircshift( x.length, 2, x, 1 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];
+ expected = [ 5.0, 1.0, 2.0, 3.0, 4.0 ];
+
+ gcircshift( x.length, 1, x, 1 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function performs a circular shift (right shift, positive k, accessors)', function test( t ) {
+ var expected;
+ var x;
+
+ x = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 ];
+ expected = [ 5.0, 6.0, 7.0, 1.0, 2.0, 3.0, 4.0 ];
+
+ gcircshift( x.length, 3, toAccessorArray( x ), 1 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ x = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ];
+ expected = [ 6.0, 7.0, 8.0, 1.0, 2.0, 3.0, 4.0, 5.0 ];
+
+ gcircshift( x.length, 3, toAccessorArray( x ), 1 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function performs a circular shift (left shift, negative k)', function test( t ) {
+ var expected;
+ var x;
+
+ x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];
+ expected = [ 3.0, 4.0, 5.0, 1.0, 2.0 ];
+
+ gcircshift( x.length, -2, x, 1 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];
+ expected = [ 2.0, 3.0, 4.0, 5.0, 1.0 ];
+
+ gcircshift( x.length, -1, x, 1 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function performs a circular shift (left shift, negative k, accessors)', function test( t ) {
+ var expected;
+ var x;
+
+ x = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 ];
+ expected = [ 4.0, 5.0, 6.0, 7.0, 1.0, 2.0, 3.0 ];
+
+ gcircshift( x.length, -3, toAccessorArray( x ), 1 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ x = [ 1.0, 2.0, 3.0, 4.0 ];
+ expected = [ 3.0, 4.0, 1.0, 2.0 ];
+
+ gcircshift( x.length, -2, toAccessorArray( x ), 1 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports specifying an arbitrary number of positions to shift', function test( t ) {
+ var expected;
+ var x;
+
+ x = [ 1.0, 2.0, 3.0, 4.0 ];
+ expected = [ 1.0, 2.0, 3.0, 4.0 ];
+
+ gcircshift( x.length, 0, x, 1 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ gcircshift( x.length, 4, x, 1 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ gcircshift( x.length, -4, x, 1 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ gcircshift( x.length, 8, x, 1 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];
+ expected = [ 4.0, 5.0, 1.0, 2.0, 3.0 ];
+
+ gcircshift( x.length, 7, x, 1 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];
+ expected = [ 3.0, 4.0, 5.0, 1.0, 2.0 ];
+
+ gcircshift( x.length, -7, x, 1 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports specifying an arbitrary number of positions to shift (accessors)', function test( t ) {
+ var expected;
+ var x;
+
+ x = [ 1.0, 2.0, 3.0, 4.0 ];
+ expected = [ 1.0, 2.0, 3.0, 4.0 ];
+
+ gcircshift( x.length, 0, toAccessorArray( x ), 1 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ gcircshift( x.length, 4, toAccessorArray( x ), 1 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];
+ expected = [ 4.0, 5.0, 1.0, 2.0, 3.0 ];
+
+ gcircshift( x.length, 7, toAccessorArray( x ), 1 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports specifying a stride', function test( t ) {
+ var expected;
+ var x;
+
+ x = [
+ 1.0, // 0
+ 0.0,
+ 2.0, // 1
+ 0.0,
+ 3.0, // 2
+ 0.0,
+ 4.0 // 3
+ ];
+ expected = [
+ 4.0, // 0
+ 0.0,
+ 1.0, // 1
+ 0.0,
+ 2.0, // 2
+ 0.0,
+ 3.0 // 3
+ ];
+
+ gcircshift( 4, 1, x, 2 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports specifying a stride (accessors)', function test( t ) {
+ var expected;
+ var x;
+
+ x = [ 1.0, 0.0, 2.0, 0.0, 3.0, 0.0, 4.0 ];
+ expected = [ 4.0, 0.0, 1.0, 0.0, 2.0, 0.0, 3.0 ];
+
+ gcircshift( 4, 1, toAccessorArray( x ), 2 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports specifying a negative stride', function test( t ) {
+ var expected;
+ var x;
+
+ x = [
+ 1.0, // 3
+ 0.0,
+ 2.0, // 2
+ 0.0,
+ 3.0, // 1
+ 0.0,
+ 4.0 // 0
+ ];
+ expected = [
+ 2.0, // 3
+ 0.0,
+ 3.0, // 2
+ 0.0,
+ 4.0, // 1
+ 0.0,
+ 1.0 // 0
+ ];
+
+ gcircshift( 4, 1, x, -2 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports specifying a negative stride (accessors)', function test( t ) {
+ var expected;
+ var x;
+
+ x = [ 1.0, 0.0, 2.0, 0.0, 3.0, 0.0, 4.0 ];
+ expected = [ 2.0, 0.0, 3.0, 0.0, 4.0, 0.0, 1.0 ];
+
+ gcircshift( 4, 1, toAccessorArray( x ), -2 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports view offsets', function test( t ) {
+ var expected;
+ var x0;
+ var x1;
+
+ x0 = new Float64Array([
+ 0.0,
+ 1.0, // 0
+ 2.0, // 1
+ 3.0, // 2
+ 4.0, // 3
+ 5.0 // 4
+ ]);
+ expected = new Float64Array([
+ 0.0,
+ 4.0, // 0
+ 5.0, // 1
+ 1.0, // 2
+ 2.0, // 3
+ 3.0 // 4
+ ]);
+
+ x1 = new Float64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 );
+
+ gcircshift( 5, 2, x1, 1 );
+ t.deepEqual( x0, expected, 'returns expected value' );
+ t.end();
+});
diff --git a/lib/node_modules/@stdlib/blas/ext/base/gcircshift/test/test.ndarray.js b/lib/node_modules/@stdlib/blas/ext/base/gcircshift/test/test.ndarray.js
new file mode 100644
index 000000000000..651f3013ae57
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/gcircshift/test/test.ndarray.js
@@ -0,0 +1,333 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2026 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var tape = require( 'tape' );
+var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );
+var gcircshift = require( './../lib/ndarray.js' );
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof gcircshift, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the function has an arity of 5', function test( t ) {
+ t.strictEqual( gcircshift.length, 5, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function performs a circular shift (right shift, positive k)', function test( t ) {
+ var expected;
+ var x;
+
+ x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];
+ expected = [ 4.0, 5.0, 1.0, 2.0, 3.0 ];
+
+ gcircshift( x.length, 2, x, 1, 0 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];
+ expected = [ 5.0, 1.0, 2.0, 3.0, 4.0 ];
+
+ gcircshift( x.length, 1, x, 1, 0 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function performs a circular shift (right shift, positive k, accessors)', function test( t ) {
+ var expected;
+ var x;
+
+ x = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 ];
+ expected = [ 5.0, 6.0, 7.0, 1.0, 2.0, 3.0, 4.0 ];
+
+ gcircshift( x.length, 3, toAccessorArray( x ), 1, 0 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ x = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ];
+ expected = [ 6.0, 7.0, 8.0, 1.0, 2.0, 3.0, 4.0, 5.0 ];
+
+ gcircshift( x.length, 3, toAccessorArray( x ), 1, 0 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function performs a circular shift (left shift, negative k)', function test( t ) {
+ var expected;
+ var x;
+
+ x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];
+ expected = [ 3.0, 4.0, 5.0, 1.0, 2.0 ];
+
+ gcircshift( x.length, -2, x, 1, 0 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];
+ expected = [ 2.0, 3.0, 4.0, 5.0, 1.0 ];
+
+ gcircshift( x.length, -1, x, 1, 0 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function performs a circular shift (left shift, negative k, accessors)', function test( t ) {
+ var expected;
+ var x;
+
+ x = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 ];
+ expected = [ 4.0, 5.0, 6.0, 7.0, 1.0, 2.0, 3.0 ];
+
+ gcircshift( x.length, -3, toAccessorArray( x ), 1, 0 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ x = [ 1.0, 2.0, 3.0, 4.0 ];
+ expected = [ 3.0, 4.0, 1.0, 2.0 ];
+
+ gcircshift( x.length, -2, toAccessorArray( x ), 1, 0 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports specifying an arbitrary number of positions to shift', function test( t ) {
+ var expected;
+ var x;
+
+ x = [ 1.0, 2.0, 3.0, 4.0 ];
+ expected = [ 1.0, 2.0, 3.0, 4.0 ];
+
+ gcircshift( x.length, 0, x, 1, 0 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ gcircshift( x.length, 4, x, 1, 0 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ gcircshift( x.length, -4, x, 1, 0 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ gcircshift( x.length, 8, x, 1, 0 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];
+ expected = [ 4.0, 5.0, 1.0, 2.0, 3.0 ];
+
+ gcircshift( x.length, 7, x, 1, 0 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];
+ expected = [ 3.0, 4.0, 5.0, 1.0, 2.0 ];
+
+ gcircshift( x.length, -7, x, 1, 0 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports specifying an arbitrary number of positions to shift (accessors)', function test( t ) {
+ var expected;
+ var x;
+
+ x = [ 1.0, 2.0, 3.0, 4.0 ];
+ expected = [ 1.0, 2.0, 3.0, 4.0 ];
+
+ gcircshift( x.length, 0, toAccessorArray( x ), 1, 0 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ gcircshift( x.length, 4, toAccessorArray( x ), 1, 0 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];
+ expected = [ 4.0, 5.0, 1.0, 2.0, 3.0 ];
+
+ gcircshift( x.length, 7, toAccessorArray( x ), 1, 0 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function returns a reference to the input array', function test( t ) {
+ var out;
+ var x;
+
+ x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];
+ out = gcircshift( x.length, 2, x, 1, 0 );
+
+ t.strictEqual( out, x, 'same reference' );
+ t.end();
+});
+
+tape( 'if provided an `N` parameter less than or equal to `0`, the function returns the input array unchanged', function test( t ) {
+ var expected;
+ var x;
+
+ x = [ 3.0, -4.0, 1.0 ];
+ expected = [ 3.0, -4.0, 1.0 ];
+
+ gcircshift( 0, 1, x, 1, 0 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ gcircshift( -4, 1, x, 1, 0 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports specifying a stride', function test( t ) {
+ var expected;
+ var x;
+
+ x = [
+ 1.0, // 0
+ 0.0,
+ 2.0, // 1
+ 0.0,
+ 3.0, // 2
+ 0.0,
+ 4.0 // 3
+ ];
+ expected = [
+ 4.0, // 0
+ 0.0,
+ 1.0, // 1
+ 0.0,
+ 2.0, // 2
+ 0.0,
+ 3.0 // 3
+ ];
+
+ gcircshift( 4, 1, x, 2, 0 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports specifying a stride (accessors)', function test( t ) {
+ var expected;
+ var x;
+
+ x = [ 1.0, 0.0, 2.0, 0.0, 3.0, 0.0, 4.0 ];
+ expected = [ 4.0, 0.0, 1.0, 0.0, 2.0, 0.0, 3.0 ];
+
+ gcircshift( 4, 1, toAccessorArray( x ), 2, 0 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports specifying a negative stride', function test( t ) {
+ var expected;
+ var x;
+
+ x = [
+ 1.0, // 3
+ 0.0,
+ 2.0, // 2
+ 0.0,
+ 3.0, // 1
+ 0.0,
+ 4.0 // 0
+ ];
+ expected = [
+ 2.0, // 3
+ 0.0,
+ 3.0, // 2
+ 0.0,
+ 4.0, // 1
+ 0.0,
+ 1.0 // 0
+ ];
+
+ gcircshift( 4, 1, x, -2, x.length-1 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports specifying a negative stride (accessors)', function test( t ) {
+ var expected;
+ var x;
+
+ x = [ 1.0, 0.0, 2.0, 0.0, 3.0, 0.0, 4.0 ];
+ expected = [ 2.0, 0.0, 3.0, 0.0, 4.0, 0.0, 1.0 ];
+
+ gcircshift( 4, 1, toAccessorArray( x ), -2, x.length-1 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports specifying an offset', function test( t ) {
+ var expected;
+ var x;
+
+ x = [
+ 0.0,
+ 1.0, // 0
+ 2.0, // 1
+ 3.0, // 2
+ 4.0, // 3
+ 5.0 // 4
+ ];
+ expected = [
+ 0.0,
+ 4.0, // 0
+ 5.0, // 1
+ 1.0, // 2
+ 2.0, // 3
+ 3.0 // 4
+ ];
+
+ gcircshift( 5, 2, x, 1, 1 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ x = [
+ 0.0,
+ 1.0, // 0
+ 0.0,
+ 2.0, // 1
+ 0.0,
+ 3.0, // 2
+ 0.0,
+ 4.0 // 3
+ ];
+ expected = [
+ 0.0,
+ 4.0, // 0
+ 0.0,
+ 1.0, // 1
+ 0.0,
+ 2.0, // 2
+ 0.0,
+ 3.0 // 3
+ ];
+
+ gcircshift( 4, 1, x, 2, 1 );
+ t.deepEqual( x, expected, 'returns expected value' );
+
+ t.end();
+});