diff --git a/base/fliplr/README.md b/base/fliplr/README.md
new file mode 100644
index 00000000..debe13c9
--- /dev/null
+++ b/base/fliplr/README.md
@@ -0,0 +1,153 @@
+
+
+# fliplr
+
+> Return a view of an input ndarray in which the order of elements along the last dimension is reversed.
+
+
+
+
+
+
+
+
+
+
+
+## Usage
+
+```javascript
+var fliplr = require( '@stdlib/ndarray/base/fliplr' );
+```
+
+#### fliplr( x, writable )
+
+Returns a view of an input ndarray in which the order of elements along the last dimension is reversed.
+
+```javascript
+var ndarray = require( '@stdlib/ndarray/ctor' );
+var ndarray2array = require( '@stdlib/ndarray/to-array' );
+
+var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];
+var shape = [ 3, 2 ];
+var strides = [ 2, 1 ];
+var offset = 0;
+
+var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );
+// returns
+
+var sh = x.shape;
+// returns [ 3, 2 ]
+
+var arr = ndarray2array( x );
+// returns [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ]
+
+var y = fliplr( x, false );
+// returns
+
+sh = y.shape;
+// returns [ 3, 2 ]
+
+arr = ndarray2array( y );
+// returns [ [ 2.0, 1.0 ], [ 4.0, 3.0 ], [ 6.0, 5.0 ] ]
+```
+
+The function accepts the following arguments:
+
+- **x**: input ndarray.
+- **writable**: boolean indicating whether a returned ndarray should be writable.
+
+
+
+
+
+
+
+
+
+## Notes
+
+- If provided a zero-dimensional ndarray, as the ndarray has no dimensions to reverse, the function simply returns a new view of the input ndarray.
+- The `writable` parameter **only** applies to ndarray constructors supporting **read-only** instances.
+
+
+
+
+
+
+
+
+
+## Examples
+
+
+
+```javascript
+var array = require( '@stdlib/ndarray/array' );
+var ndarray2array = require( '@stdlib/ndarray/to-array' );
+var zeroTo = require( '@stdlib/array/base/zero-to' );
+var fliplr = require( '@stdlib/ndarray/base/fliplr' );
+
+// Create a linear ndarray buffer:
+var buf = zeroTo( 16 );
+
+// Create a three-dimensional ndarray:
+var x = array( buf, {
+ 'shape': [ 2, 4, 2 ]
+});
+
+// Reverse the order of last dimension:
+var y = fliplr( x, false );
+// returns
+
+var a = ndarray2array( y );
+// returns [ [ [ 1, 0 ], [ 3, 2 ], [ 5, 4 ], [ 7, 6 ] ], [ [ 9, 8 ], [ 11, 10 ], [ 13, 12 ], [ 15, 14 ] ] ]
+```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/base/fliplr/benchmark/benchmark.js b/base/fliplr/benchmark/benchmark.js
new file mode 100644
index 00000000..6c71cc92
--- /dev/null
+++ b/base/fliplr/benchmark/benchmark.js
@@ -0,0 +1,331 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2023 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 isndarrayLike = require( '@stdlib/assert/is-ndarray-like' );
+var baseEmpty = require( './../../../base/empty' );
+var empty = require( './../../../empty' );
+var pkg = require( './../package.json' ).name;
+var fliplr = require( './../lib' );
+
+
+// MAIN //
+
+bench( pkg+'::1d,base', function benchmark( b ) {
+ var values;
+ var v;
+ var i;
+
+ values = [
+ baseEmpty( 'float64', [ 2 ], 'row-major' ),
+ baseEmpty( 'float32', [ 2 ], 'row-major' ),
+ baseEmpty( 'int32', [ 2 ], 'row-major' ),
+ baseEmpty( 'complex128', [ 2 ], 'row-major' ),
+ baseEmpty( 'generic', [ 2 ], 'row-major' )
+ ];
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ v = fliplr( values[ i%values.length ], false );
+ if ( typeof v !== 'object' ) {
+ b.fail( 'should return an ndarray' );
+ }
+ }
+ b.toc();
+ if ( !isndarrayLike( v ) ) {
+ b.fail( 'should return an ndarray' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+});
+
+bench( pkg+'::1d,non-base', function benchmark( b ) {
+ var values;
+ var v;
+ var i;
+
+ /* eslint-disable object-curly-newline */
+
+ values = [
+ empty( [ 2 ], { 'dtype': 'float64' } ),
+ empty( [ 2 ], { 'dtype': 'float32' } ),
+ empty( [ 2 ], { 'dtype': 'int32' } ),
+ empty( [ 2 ], { 'dtype': 'complex128' } ),
+ empty( [ 2 ], { 'dtype': 'generic' } )
+ ];
+
+ /* eslint-enable object-curly-newline */
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ v = fliplr( values[ i%values.length ], false );
+ if ( typeof v !== 'object' ) {
+ b.fail( 'should return an ndarray' );
+ }
+ }
+ b.toc();
+ if ( !isndarrayLike( v ) ) {
+ b.fail( 'should return an ndarray' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+});
+
+bench( pkg+'::2d,base', function benchmark( b ) {
+ var values;
+ var v;
+ var i;
+
+ values = [
+ baseEmpty( 'float64', [ 2, 2 ], 'row-major' ),
+ baseEmpty( 'float32', [ 2, 2 ], 'row-major' ),
+ baseEmpty( 'int32', [ 2, 2 ], 'row-major' ),
+ baseEmpty( 'complex128', [ 2, 2 ], 'row-major' ),
+ baseEmpty( 'generic', [ 2, 2 ], 'row-major' )
+ ];
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ v = fliplr( values[ i%values.length ], false );
+ if ( typeof v !== 'object' ) {
+ b.fail( 'should return an ndarray' );
+ }
+ }
+ b.toc();
+ if ( !isndarrayLike( v ) ) {
+ b.fail( 'should return an ndarray' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+});
+
+bench( pkg+'::2d,non-base', function benchmark( b ) {
+ var values;
+ var v;
+ var i;
+
+ /* eslint-disable object-curly-newline */
+
+ values = [
+ empty( [ 2, 2 ], { 'dtype': 'float64' } ),
+ empty( [ 2, 2 ], { 'dtype': 'float32' } ),
+ empty( [ 2, 2 ], { 'dtype': 'int32' } ),
+ empty( [ 2, 2 ], { 'dtype': 'complex128' } ),
+ empty( [ 2, 2 ], { 'dtype': 'generic' } )
+ ];
+
+ /* eslint-enable object-curly-newline */
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ v = fliplr( values[ i%values.length ], false );
+ if ( typeof v !== 'object' ) {
+ b.fail( 'should return an ndarray' );
+ }
+ }
+ b.toc();
+ if ( !isndarrayLike( v ) ) {
+ b.fail( 'should return an ndarray' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+});
+
+bench( pkg+'::3d,base', function benchmark( b ) {
+ var values;
+ var v;
+ var i;
+
+ values = [
+ baseEmpty( 'float64', [ 2, 2, 2 ], 'row-major' ),
+ baseEmpty( 'float32', [ 2, 2, 2 ], 'row-major' ),
+ baseEmpty( 'int32', [ 2, 2, 2 ], 'row-major' ),
+ baseEmpty( 'complex128', [ 2, 2, 2 ], 'row-major' ),
+ baseEmpty( 'generic', [ 2, 2, 2 ], 'row-major' )
+ ];
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ v = fliplr( values[ i%values.length ], false );
+ if ( typeof v !== 'object' ) {
+ b.fail( 'should return an ndarray' );
+ }
+ }
+ b.toc();
+ if ( !isndarrayLike( v ) ) {
+ b.fail( 'should return an ndarray' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+});
+
+bench( pkg+'::3d,non-base', function benchmark( b ) {
+ var values;
+ var v;
+ var i;
+
+ /* eslint-disable object-curly-newline */
+
+ values = [
+ empty( [ 2, 2, 2 ], { 'dtype': 'float64' } ),
+ empty( [ 2, 2, 2 ], { 'dtype': 'float32' } ),
+ empty( [ 2, 2, 2 ], { 'dtype': 'int32' } ),
+ empty( [ 2, 2, 2 ], { 'dtype': 'complex128' } ),
+ empty( [ 2, 2, 2 ], { 'dtype': 'generic' } )
+ ];
+
+ /* eslint-enable object-curly-newline */
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ v = fliplr( values[ i%values.length ], false );
+ if ( typeof v !== 'object' ) {
+ b.fail( 'should return an ndarray' );
+ }
+ }
+ b.toc();
+ if ( !isndarrayLike( v ) ) {
+ b.fail( 'should return an ndarray' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+});
+
+bench( pkg+'::4d,base', function benchmark( b ) {
+ var values;
+ var v;
+ var i;
+
+ values = [
+ baseEmpty( 'float64', [ 2, 2, 2, 2 ], 'row-major' ),
+ baseEmpty( 'float32', [ 2, 2, 2, 2 ], 'row-major' ),
+ baseEmpty( 'int32', [ 2, 2, 2, 2 ], 'row-major' ),
+ baseEmpty( 'complex128', [ 2, 2, 2, 2 ], 'row-major' ),
+ baseEmpty( 'generic', [ 2, 2, 2, 2 ], 'row-major' )
+ ];
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ v = fliplr( values[ i%values.length ], false );
+ if ( typeof v !== 'object' ) {
+ b.fail( 'should return an ndarray' );
+ }
+ }
+ b.toc();
+ if ( !isndarrayLike( v ) ) {
+ b.fail( 'should return an ndarray' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+});
+
+bench( pkg+'::4d,non-base', function benchmark( b ) {
+ var values;
+ var v;
+ var i;
+
+ /* eslint-disable object-curly-newline */
+
+ values = [
+ empty( [ 2, 2, 2, 2 ], { 'dtype': 'float64' } ),
+ empty( [ 2, 2, 2, 2 ], { 'dtype': 'float32' } ),
+ empty( [ 2, 2, 2, 2 ], { 'dtype': 'int32' } ),
+ empty( [ 2, 2, 2, 2 ], { 'dtype': 'complex128' } ),
+ empty( [ 2, 2, 2, 2 ], { 'dtype': 'generic' } )
+ ];
+
+ /* eslint-enable object-curly-newline */
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ v = fliplr( values[ i%values.length ], false );
+ if ( typeof v !== 'object' ) {
+ b.fail( 'should return an ndarray' );
+ }
+ }
+ b.toc();
+ if ( !isndarrayLike( v ) ) {
+ b.fail( 'should return an ndarray' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+});
+
+bench( pkg+'::5d,base', function benchmark( b ) {
+ var values;
+ var v;
+ var i;
+
+ values = [
+ baseEmpty( 'float64', [ 2, 2, 2, 2, 2 ], 'row-major' ),
+ baseEmpty( 'float32', [ 2, 2, 2, 2, 2 ], 'row-major' ),
+ baseEmpty( 'int32', [ 2, 2, 2, 2, 2 ], 'row-major' ),
+ baseEmpty( 'complex128', [ 2, 2, 2, 2, 2 ], 'row-major' ),
+ baseEmpty( 'generic', [ 2, 2, 2, 2, 2 ], 'row-major' )
+ ];
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ v = fliplr( values[ i%values.length ], false );
+ if ( typeof v !== 'object' ) {
+ b.fail( 'should return an ndarray' );
+ }
+ }
+ b.toc();
+ if ( !isndarrayLike( v ) ) {
+ b.fail( 'should return an ndarray' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+});
+
+bench( pkg+'::5d,non-base', function benchmark( b ) {
+ var values;
+ var v;
+ var i;
+
+ /* eslint-disable object-curly-newline */
+
+ values = [
+ empty( [ 2, 2, 2, 2, 2 ], { 'dtype': 'float64' } ),
+ empty( [ 2, 2, 2, 2, 2 ], { 'dtype': 'float32' } ),
+ empty( [ 2, 2, 2, 2, 2 ], { 'dtype': 'int32' } ),
+ empty( [ 2, 2, 2, 2, 2 ], { 'dtype': 'complex128' } ),
+ empty( [ 2, 2, 2, 2, 2 ], { 'dtype': 'generic' } )
+ ];
+
+ /* eslint-enable object-curly-newline */
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ v = fliplr( values[ i%values.length ], false );
+ if ( typeof v !== 'object' ) {
+ b.fail( 'should return an ndarray' );
+ }
+ }
+ b.toc();
+ if ( !isndarrayLike( v ) ) {
+ b.fail( 'should return an ndarray' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+});
diff --git a/base/fliplr/docs/repl.txt b/base/fliplr/docs/repl.txt
new file mode 100644
index 00000000..f858a0d1
--- /dev/null
+++ b/base/fliplr/docs/repl.txt
@@ -0,0 +1,39 @@
+
+{{alias}}( x, writable )
+ Returns a view of an input ndarray in which the order of elements along the
+ last dimension is reversed.
+
+ If provided a zero-dimensional ndarray, as the ndarray has no dimensions to
+ reverse, the function simply returns a new view of the input ndarray.
+
+ Parameters
+ ----------
+ x: ndarray
+ Input array.
+
+ writable: boolean
+ Boolean indicating whether a returned ndarray should be writable. This
+ parameter only applies to ndarray constructors which support read-only
+ instances.
+
+ Returns
+ -------
+ out: ndarray
+ Output array view.
+
+ Examples
+ --------
+ > var x = {{alias:@stdlib/ndarray/array}}( [ [ 1, 2 ], [ 3, 4 ] ] )
+
+ > x.shape
+ [ 2, 2 ]
+ > var y = {{alias}}( x, false )
+
+ > y.shape
+ [ 2, 2 ]
+ > {{alias:@stdlib/ndarray/to-array}}( y )
+ [ [ 2, 1 ], [ 4, 3 ] ]
+
+ See Also
+ --------
+
diff --git a/base/fliplr/docs/types/index.d.ts b/base/fliplr/docs/types/index.d.ts
new file mode 100644
index 00000000..a0737205
--- /dev/null
+++ b/base/fliplr/docs/types/index.d.ts
@@ -0,0 +1,497 @@
+/*
+* @license Apache-2.0
+*
+* Copyright (c) 2023 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 { typedndarray, genericndarray, float64ndarray, float32ndarray, int32ndarray, int16ndarray, int8ndarray, uint32ndarray, uint16ndarray, uint8ndarray, uint8cndarray, complex128ndarray, complex64ndarray } from '@stdlib/types/ndarray';
+
+/**
+* Returns a view of an input ndarray in which the order of elements along the last dimension is reversed.
+*
+* @param x - input array
+* @param writable - boolean indicating whether a returned array should be writable
+* @returns output array
+*
+* @example
+* var typedarray = require( `@stdlib/array/typed` );
+* var ndarray = require( `@stdlib/ndarray/ctor` );
+* var ndarray2array = require( `@stdlib/ndarray/to-array` );
+*
+* var buffer = typedarray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ], 'float64' );
+* var shape = [ 3, 2 ];
+* var strides = [ 2, 1 ];
+* var offset = 0;
+*
+* var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' );
+* // returns
+*
+* var sh = x.shape;
+* // returns [ 3, 2 ]
+*
+* var arr = ndarray2array( x );
+* // returns [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ]
+*
+* var y = fliplr( x, false );
+* // returns
+*
+* sh = y.shape;
+* // returns [ 3, 2 ]
+*
+* arr = ndarray2array( y );
+* // returns [ [ 2.0, 1.0 ], [ 4.0, 3.0 ], [ 6.0, 5.0 ] ]
+*/
+declare function fliplr( x: float64ndarray, writable: boolean ): float64ndarray;
+
+/**
+* Returns a view of an input ndarray in which the order of elements along the last dimension is reversed.
+*
+* @param x - input array
+* @param writable - boolean indicating whether a returned array should be writable
+* @returns output array
+*
+* @example
+* var typedarray = require( `@stdlib/array/typed` );
+* var ndarray = require( `@stdlib/ndarray/ctor` );
+* var ndarray2array = require( `@stdlib/ndarray/to-array` );
+*
+* var buffer = typedarray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ], 'float32' );
+* var shape = [ 3, 2 ];
+* var strides = [ 2, 1 ];
+* var offset = 0;
+*
+* var x = ndarray( 'float32', buffer, shape, strides, offset, 'row-major' );
+* // returns
+*
+* var sh = x.shape;
+* // returns [ 3, 2 ]
+*
+* var arr = ndarray2array( x );
+* // returns [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ]
+*
+* var y = fliplr( x, false );
+* // returns
+*
+* sh = y.shape;
+* // returns [ 3, 2 ]
+*
+* arr = ndarray2array( y );
+* // returns [ [ 2.0, 1.0 ], [ 4.0, 3.0 ], [ 6.0, 5.0 ] ]
+*/
+declare function fliplr( x: float32ndarray, writable: boolean ): float32ndarray;
+
+/**
+* Returns a view of an input ndarray in which the order of elements along the last dimension is reversed.
+*
+* @param x - input array
+* @param writable - boolean indicating whether a returned array should be writable
+* @returns output array
+*
+* @example
+* var typedarray = require( `@stdlib/array/typed` );
+* var ndarray = require( `@stdlib/ndarray/ctor` );
+* var ndarray2array = require( `@stdlib/ndarray/to-array` );
+*
+* var buffer = typedarray( [ 1, 2, 3, 4, 5, 6 ], 'int32' );
+* var shape = [ 3, 2 ];
+* var strides = [ 2, 1 ];
+* var offset = 0;
+*
+* var x = ndarray( 'int32', buffer, shape, strides, offset, 'row-major' );
+* // returns
+*
+* var sh = x.shape;
+* // returns [ 3, 2 ]
+*
+* var arr = ndarray2array( x );
+* // returns [ [ 1, 2 ], [ 3, 4 ], [ 5, 6 ] ]
+*
+* var y = fliplr( x, false );
+* // returns
+*
+* sh = y.shape;
+* // returns [ 3, 2 ]
+*
+* arr = ndarray2array( y );
+* // returns [ [ 2, 1 ], [ 4, 3 ], [ 6, 5 ] ]
+*/
+declare function fliplr( x: int32ndarray, writable: boolean ): int32ndarray;
+
+/**
+* Returns a view of an input ndarray in which the order of elements along the last dimension is reversed.
+*
+* @param x - input array
+* @param writable - boolean indicating whether a returned array should be writable
+* @returns output array
+*
+* @example
+* var typedarray = require( `@stdlib/array/typed` );
+* var ndarray = require( `@stdlib/ndarray/ctor` );
+* var ndarray2array = require( `@stdlib/ndarray/to-array` );
+*
+* var buffer = typedarray( [ 1, 2, 3, 4, 5, 6 ], 'int16' );
+* var shape = [ 3, 2 ];
+* var strides = [ 2, 1 ];
+* var offset = 0;
+*
+* var x = ndarray( 'int16', buffer, shape, strides, offset, 'row-major' );
+* // returns
+*
+* var sh = x.shape;
+* // returns [ 3, 2 ]
+*
+* var arr = ndarray2array( x );
+* // returns [ [ 1, 2 ], [ 3, 4 ], [ 5, 6 ] ]
+*
+* var y = fliplr( x, false );
+* // returns
+*
+* sh = y.shape;
+* // returns [ 3, 2 ]
+*
+* arr = ndarray2array( y );
+* // returns [ [ 2, 1 ], [ 4, 3 ], [ 6, 5 ] ]
+*/
+declare function fliplr( x: int16ndarray, writable: boolean ): int16ndarray;
+
+/**
+* Returns a view of an input ndarray in which the order of elements along the last dimension is reversed.
+*
+* @param x - input array
+* @param writable - boolean indicating whether a returned array should be writable
+* @returns output array
+*
+* @example
+* var typedarray = require( `@stdlib/array/typed` );
+* var ndarray = require( `@stdlib/ndarray/ctor` );
+* var ndarray2array = require( `@stdlib/ndarray/to-array` );
+*
+* var buffer = typedarray( [ 1, 2, 3, 4, 5, 6 ], 'int8' );
+* var shape = [ 3, 2 ];
+* var strides = [ 2, 1 ];
+* var offset = 0;
+*
+* var x = ndarray( 'int8', buffer, shape, strides, offset, 'row-major' );
+* // returns
+*
+* var sh = x.shape;
+* // returns [ 3, 2 ]
+*
+* var arr = ndarray2array( x );
+* // returns [ [ 1, 2 ], [ 3, 4 ], [ 5, 6 ] ]
+*
+* var y = fliplr( x, false );
+* // returns
+*
+* sh = y.shape;
+* // returns [ 3, 2 ]
+*
+* arr = ndarray2array( y );
+* // returns [ [ 2, 1 ], [ 4, 3 ], [ 6, 5 ] ]
+*/
+declare function fliplr( x: int8ndarray, writable: boolean ): int8ndarray;
+
+/**
+* Returns a view of an input ndarray in which the order of elements along the last dimension is reversed.
+*
+* @param x - input array
+* @param writable - boolean indicating whether a returned array should be writable
+* @returns output array
+*
+* @example
+* var typedarray = require( `@stdlib/array/typed` );
+* var ndarray = require( `@stdlib/ndarray/ctor` );
+* var ndarray2array = require( `@stdlib/ndarray/to-array` );
+*
+* var buffer = typedarray( [ 1, 2, 3, 4, 5, 6 ], 'uint32' );
+* var shape = [ 3, 2 ];
+* var strides = [ 2, 1 ];
+* var offset = 0;
+*
+* var x = ndarray( 'uint32', buffer, shape, strides, offset, 'row-major' );
+* // returns
+*
+* var sh = x.shape;
+* // returns [ 3, 2 ]
+*
+* var arr = ndarray2array( x );
+* // returns [ [ 1, 2 ], [ 3, 4 ], [ 5, 6 ] ]
+*
+* var y = fliplr( x, false );
+* // returns
+*
+* sh = y.shape;
+* // returns [ 3, 2 ]
+*
+* arr = ndarray2array( y );
+* // returns [ [ 2, 1 ], [ 4, 3 ], [ 6, 5 ] ]
+*/
+declare function fliplr( x: uint32ndarray, writable: boolean ): uint32ndarray;
+
+/**
+* Returns a view of an input ndarray in which the order of elements along the last dimension is reversed.
+*
+* @param x - input array
+* @param writable - boolean indicating whether a returned array should be writable
+* @returns output array
+*
+* @example
+* var typedarray = require( `@stdlib/array/typed` );
+* var ndarray = require( `@stdlib/ndarray/ctor` );
+* var ndarray2array = require( `@stdlib/ndarray/to-array` );
+*
+* var buffer = typedarray( [ 1, 2, 3, 4, 5, 6 ], 'uint16' );
+* var shape = [ 3, 2 ];
+* var strides = [ 2, 1 ];
+* var offset = 0;
+*
+* var x = ndarray( 'uint16', buffer, shape, strides, offset, 'row-major' );
+* // returns
+*
+* var sh = x.shape;
+* // returns [ 3, 2 ]
+*
+* var arr = ndarray2array( x );
+* // returns [ [ 1, 2 ], [ 3, 4 ], [ 5, 6 ] ]
+*
+* var y = fliplr( x, false );
+* // returns
+*
+* sh = y.shape;
+* // returns [ 3, 2 ]
+*
+* arr = ndarray2array( y );
+* // returns [ [ 2, 1 ], [ 4, 3 ], [ 6, 5 ] ]
+*/
+declare function fliplr( x: uint16ndarray, writable: boolean ): uint16ndarray;
+
+/**
+* Returns a view of an input ndarray in which the order of elements along the last dimension is reversed.
+*
+* @param x - input array
+* @param writable - boolean indicating whether a returned array should be writable
+* @returns output array
+*
+* @example
+* var typedarray = require( `@stdlib/array/typed` );
+* var ndarray = require( `@stdlib/ndarray/ctor` );
+* var ndarray2array = require( `@stdlib/ndarray/to-array` );
+*
+* var buffer = typedarray( [ 1, 2, 3, 4, 5, 6 ], 'uint8' );
+* var shape = [ 3, 2 ];
+* var strides = [ 2, 1 ];
+* var offset = 0;
+*
+* var x = ndarray( 'uint8', buffer, shape, strides, offset, 'row-major' );
+* // returns
+*
+* var sh = x.shape;
+* // returns [ 3, 2 ]
+*
+* var arr = ndarray2array( x );
+* // returns [ [ 1, 2 ], [ 3, 4 ], [ 5, 6 ] ]
+*
+* var y = fliplr( x, false );
+* // returns
+*
+* sh = y.shape;
+* // returns [ 3, 2 ]
+*
+* arr = ndarray2array( y );
+* // returns [ [ 2, 1 ], [ 4, 3 ], [ 6, 5 ] ]
+*/
+declare function fliplr( x: uint8ndarray, writable: boolean ): uint8ndarray;
+
+/**
+* Returns a view of an input ndarray in which the order of elements along the last dimension is reversed.
+*
+* @param x - input array
+* @param writable - boolean indicating whether a returned array should be writable
+* @returns output array
+*
+* @example
+* var typedarray = require( `@stdlib/array/typed` );
+* var ndarray = require( `@stdlib/ndarray/ctor` );
+* var ndarray2array = require( `@stdlib/ndarray/to-array` );
+*
+* var buffer = typedarray( [ 1, 2, 3, 4, 5, 6 ], 'uint8c' );
+* var shape = [ 3, 2 ];
+* var strides = [ 2, 1 ];
+* var offset = 0;
+*
+* var x = ndarray( 'uint8c', buffer, shape, strides, offset, 'row-major' );
+* // returns
+*
+* var sh = x.shape;
+* // returns [ 3, 2 ]
+*
+* var arr = ndarray2array( x );
+* // returns [ [ 1, 2 ], [ 3, 4 ], [ 5, 6 ] ]
+*
+* var y = fliplr( x, false );
+* // returns
+*
+* sh = y.shape;
+* // returns [ 3, 2 ]
+*
+* arr = ndarray2array( y );
+* // returns [ [ 2, 1 ], [ 4, 3 ], [ 6, 5 ] ]
+*/
+declare function fliplr( x: uint8cndarray, writable: boolean ): uint8cndarray;
+
+/**
+* Returns a view of an input ndarray in which the order of elements along the last dimension is reversed.
+*
+* @param x - input array
+* @param writable - boolean indicating whether a returned array should be writable
+* @returns output array
+*
+* @example
+* var typedarray = require( `@stdlib/array/typed` );
+* var ndarray = require( `@stdlib/ndarray/ctor` );
+* var ndarray2array = require( `@stdlib/ndarray/to-array` );
+*
+* var buffer = typedarray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ], 'complex128' );
+* var shape = [ 3, 2 ];
+* var strides = [ 2, 1 ];
+* var offset = 0;
+*
+* var x = ndarray( 'complex128', buffer, shape, strides, offset, 'row-major' );
+* // returns
+*
+* var sh = x.shape;
+* // returns [ 3, 2 ]
+*
+* var y = fliplr( x, false );
+* // returns
+*
+* sh = y.shape;
+* // returns [ 3, 2 ]
+*/
+declare function fliplr( x: complex128ndarray, writable: boolean ): complex128ndarray;
+
+/**
+* Returns a view of an input ndarray in which the order of elements along the last dimension is reversed.
+*
+* @param x - input array
+* @param writable - boolean indicating whether a returned array should be writable
+* @returns output array
+*
+* @example
+* var typedarray = require( `@stdlib/array/typed` );
+* var ndarray = require( `@stdlib/ndarray/ctor` );
+* var ndarray2array = require( `@stdlib/ndarray/to-array` );
+*
+* var buffer = typedarray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ], 'complex64' );
+* var shape = [ 3, 2 ];
+* var strides = [ 2, 1 ];
+* var offset = 0;
+*
+* var x = ndarray( 'complex64', buffer, shape, strides, offset, 'row-major' );
+* // returns
+*
+* var sh = x.shape;
+* // returns [ 3, 2 ]
+*
+* var y = fliplr( x, false );
+* // returns
+*
+* sh = y.shape;
+* // returns [ 3, 2 ]
+*/
+declare function fliplr( x: complex64ndarray, writable: boolean ): complex64ndarray;
+
+/**
+* Returns a view of an input ndarray in which the order of elements along the last dimension is reversed.
+*
+* @param x - input array
+* @param writable - boolean indicating whether a returned array should be writable
+* @returns output array
+*
+* @example
+* var typedarray = require( `@stdlib/array/typed` );
+* var ndarray = require( `@stdlib/ndarray/ctor` );
+* var ndarray2array = require( `@stdlib/ndarray/to-array` );
+*
+* var buffer = [ 1, 2, 3, 4, 5, 6 ];
+* var shape = [ 3, 2 ];
+* var strides = [ 2, 1 ];
+* var offset = 0;
+*
+* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );
+* // returns
+*
+* var sh = x.shape;
+* // returns [ 3, 2 ]
+*
+* var arr = ndarray2array( x );
+* // returns [ [ 1, 2 ], [ 3, 4 ], [ 5, 6 ] ]
+*
+* var y = fliplr( x, false );
+* // returns
+*
+* sh = y.shape;
+* // returns [ 3, 2 ]
+*
+* arr = ndarray2array( y );
+* // returns [ [ 2, 1 ], [ 4, 3 ], [ 6, 5 ] ]
+*/
+declare function fliplr( x: genericndarray, writable: boolean ): genericndarray;
+
+/**
+* Returns a view of an input ndarray in which the order of elements along the last dimension is reversed.
+*
+* @param x - input array
+* @param writable - boolean indicating whether a returned array should be writable
+* @returns output array
+*
+* @example
+* var typedarray = require( `@stdlib/array/typed` );
+* var ndarray = require( `@stdlib/ndarray/ctor` );
+* var ndarray2array = require( `@stdlib/ndarray/to-array` );
+*
+* var buffer = [ 1, 2, 3, 4, 5, 6 ];
+* var shape = [ 3, 2 ];
+* var strides = [ 2, 1 ];
+* var offset = 0;
+*
+* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );
+* // returns
+*
+* var sh = x.shape;
+* // returns [ 3, 2 ]
+*
+* var arr = ndarray2array( x );
+* // returns [ [ 1, 2 ], [ 3, 4 ], [ 5, 6 ] ]
+*
+* var y = fliplr( x, false );
+* // returns
+*
+* sh = y.shape;
+* // returns [ 3, 2 ]
+*
+* arr = ndarray2array( y );
+* // returns [ [ 2, 1 ], [ 4, 3 ], [ 6, 5 ] ]
+*/
+declare function fliplr( x: typedndarray, writable: boolean ): typedndarray;
+
+
+// EXPORTS //
+
+export = fliplr;
diff --git a/base/fliplr/docs/types/test.ts b/base/fliplr/docs/types/test.ts
new file mode 100644
index 00000000..4916cc16
--- /dev/null
+++ b/base/fliplr/docs/types/test.ts
@@ -0,0 +1,95 @@
+/*
+* @license Apache-2.0
+*
+* Copyright (c) 2023 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 empty = require( './../../../../base/empty' );
+import fliplr = require( './index' );
+
+
+// TESTS //
+
+// The function returns an ndarray...
+{
+ const order = 'row-major';
+ const sh = [ 2, 2 ];
+
+ fliplr( empty( 'float64', sh, order ), false ); // $ExpectType float64ndarray
+ fliplr( empty( 'float32', sh, order ), false ); // $ExpectType float32ndarray
+ fliplr( empty( 'complex128', sh, order ), false ); // $ExpectType complex128ndarray
+ fliplr( empty( 'complex64', sh, order ), false ); // $ExpectType complex64ndarray
+ fliplr( empty( 'int32', sh, order ), false ); // $ExpectType int32ndarray
+ fliplr( empty( 'int16', sh, order ), false ); // $ExpectType int16ndarray
+ fliplr( empty( 'int8', sh, order ), false ); // $ExpectType int8ndarray
+ fliplr( empty( 'uint32', sh, order ), false ); // $ExpectType uint32ndarray
+ fliplr( empty( 'uint16', sh, order ), false ); // $ExpectType uint16ndarray
+ fliplr( empty( 'uint8', sh, order ), false ); // $ExpectType uint8ndarray
+ fliplr( empty( 'uint8c', sh, order ), false ); // $ExpectType uint8cndarray
+
+ fliplr( empty( 'float64', sh, order ), true ); // $ExpectType float64ndarray
+ fliplr( empty( 'float32', sh, order ), true ); // $ExpectType float32ndarray
+ fliplr( empty( 'complex128', sh, order ), true ); // $ExpectType complex128ndarray
+ fliplr( empty( 'complex64', sh, order ), true ); // $ExpectType complex64ndarray
+ fliplr( empty( 'int32', sh, order ), true ); // $ExpectType int32ndarray
+ fliplr( empty( 'int16', sh, order ), true ); // $ExpectType int16ndarray
+ fliplr( empty( 'int8', sh, order ), true ); // $ExpectType int8ndarray
+ fliplr( empty( 'uint32', sh, order ), true ); // $ExpectType uint32ndarray
+ fliplr( empty( 'uint16', sh, order ), true ); // $ExpectType uint16ndarray
+ fliplr( empty( 'uint8', sh, order ), true ); // $ExpectType uint8ndarray
+ fliplr( empty( 'uint8c', sh, order ), true ); // $ExpectType uint8cndarray
+}
+
+// The compiler throws an error if the function is provided a first argument which is not an ndarray...
+{
+ fliplr( '10', false ); // $ExpectError
+ fliplr( 10, false ); // $ExpectError
+ fliplr( false, false ); // $ExpectError
+ fliplr( true, false ); // $ExpectError
+ fliplr( null, false ); // $ExpectError
+ fliplr( [], false ); // $ExpectError
+ fliplr( {}, false ); // $ExpectError
+ fliplr( ( x: number ): number => x, false ); // $ExpectError
+
+ fliplr( '10', true ); // $ExpectError
+ fliplr( 10, true ); // $ExpectError
+ fliplr( false, true ); // $ExpectError
+ fliplr( true, true ); // $ExpectError
+ fliplr( null, true ); // $ExpectError
+ fliplr( [], true ); // $ExpectError
+ fliplr( {}, true ); // $ExpectError
+ fliplr( ( x: number ): number => x, true ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a second argument which is not a boolean...
+{
+ const x = empty( 'float64', [ 2, 2 ], 'row-major' );
+
+ fliplr( x, '5' ); // $ExpectError
+ fliplr( x, 5 ); // $ExpectError
+ fliplr( x, null ); // $ExpectError
+ fliplr( x, undefined ); // $ExpectError
+ fliplr( x, [ '5' ] ); // $ExpectError
+ fliplr( x, {} ); // $ExpectError
+ fliplr( x, ( x: number ): number => x ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided an unsupported number of arguments...
+{
+ const x = empty( 'float64', [ 2, 2 ], 'row-major' );
+
+ fliplr( x ); // $ExpectError
+ fliplr( x, false, {} ); // $ExpectError
+}
diff --git a/base/fliplr/examples/index.js b/base/fliplr/examples/index.js
new file mode 100644
index 00000000..c44d5a0c
--- /dev/null
+++ b/base/fliplr/examples/index.js
@@ -0,0 +1,40 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2023 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 array = require( './../../../array' );
+var ndarray2array = require( './../../../to-array' );
+var zeroTo = require( '@stdlib/array/base/zero-to' );
+var fliplr = require( './../lib' );
+
+// Create a linear ndarray buffer:
+var buf = zeroTo( 16 );
+
+// Create a three-dimensional ndarray:
+var x = array( buf, {
+ 'shape': [ 2, 4, 2 ]
+});
+
+// Reverse the order of last dimension:
+var y = fliplr( x, false );
+// returns
+
+var a = ndarray2array( y );
+console.log( a );
+// => [ [ [ 1, 0 ], [ 3, 2 ], [ 5, 4 ], [ 7, 6 ] ], [ [ 9, 8 ], [ 11, 10 ], [ 13, 12 ], [ 15, 14 ] ] ]
diff --git a/base/fliplr/lib/index.js b/base/fliplr/lib/index.js
new file mode 100644
index 00000000..ffa6f4a7
--- /dev/null
+++ b/base/fliplr/lib/index.js
@@ -0,0 +1,62 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2023 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';
+
+/**
+* Return a view of an input ndarray in which the order of elements along the last dimension is reversed.
+*
+* @module @stdlib/ndarray/base/fliplr
+*
+* @example
+* var ndarray = require( '@stdlib/ndarray/ctor' );
+* var ndarray2array = require( '@stdlib/ndarray/to-array' );
+* var fliplr = require( '@stdlib/ndarray/base/fliplr' );
+*
+* var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];
+* var shape = [ 3, 2 ];
+* var strides = [ 2, 1 ];
+* var offset = 0;
+*
+* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );
+* // returns
+*
+* var sh = x.shape;
+* // returns [ 3, 2 ]
+*
+* var arr = ndarray2array( x );
+* // returns [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ]
+*
+* var y = fliplr( x, false );
+* // returns
+*
+* sh = y.shape;
+* // returns [ 3, 2 ]
+*
+* arr = ndarray2array( y );
+* // returns [ [ 2.0, 1.0 ], [ 4.0, 3.0 ], [ 6.0, 5.0 ] ]
+*/
+
+// MODULES //
+
+var main = require( './main.js' );
+
+
+// EXPORTS //
+
+module.exports = main;
diff --git a/base/fliplr/lib/main.js b/base/fliplr/lib/main.js
new file mode 100644
index 00000000..18ef8b2d
--- /dev/null
+++ b/base/fliplr/lib/main.js
@@ -0,0 +1,77 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2023 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 MultiSlice = require( '@stdlib/slice/multi' );
+var reverseDimension = require( './../../../base/reverse-dimension' );
+var slice = require( './../../../base/slice' );
+var ndims = require( './../../../base/ndims' );
+
+
+// MAIN //
+
+/**
+* Returns a view of an input ndarray in which the order of elements along the last dimension is reversed.
+*
+* @param {ndarray} x - input array
+* @param {boolean} writable - boolean indicating whether a returned array should be writable
+* @returns {ndarray} ndarray view
+*
+* @example
+* var ndarray = require( '@stdlib/ndarray/ctor' );
+* var ndarray2array = require( '@stdlib/ndarray/to-array' );
+*
+* var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];
+* var shape = [ 3, 2 ];
+* var strides = [ 2, 1 ];
+* var offset = 0;
+*
+* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );
+* // returns
+*
+* var sh = x.shape;
+* // returns [ 3, 2 ]
+*
+* var arr = ndarray2array( x );
+* // returns [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ]
+*
+* var y = fliplr( x, false );
+* // returns
+*
+* sh = y.shape;
+* // returns [ 3, 2 ]
+*
+* arr = ndarray2array( y );
+* // returns [ [ 2.0, 1.0 ], [ 4.0, 3.0 ], [ 6.0, 5.0 ] ]
+*/
+function fliplr( x, writable ) {
+ // Check whether we were provided a zero-dimensional array...
+ if ( ndims( x ) === 0 ) {
+ // Nothing to reverse so just return a new view:
+ return slice( x, new MultiSlice(), true, writable );
+ }
+ return reverseDimension( x, -1, writable );
+}
+
+
+// EXPORTS //
+
+module.exports = fliplr;
diff --git a/base/fliplr/package.json b/base/fliplr/package.json
new file mode 100644
index 00000000..b12cdaff
--- /dev/null
+++ b/base/fliplr/package.json
@@ -0,0 +1,67 @@
+{
+ "name": "@stdlib/ndarray/base/fliplr",
+ "version": "0.0.0",
+ "description": "Return a view of an input ndarray in which the order of elements along the last dimension is reversed.",
+ "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",
+ "stdtypes",
+ "types",
+ "base",
+ "data",
+ "structure",
+ "vector",
+ "ndarray",
+ "matrix",
+ "slice",
+ "view",
+ "reverse",
+ "flip",
+ "numpy.fliplr"
+ ]
+}
diff --git a/base/fliplr/test/test.js b/base/fliplr/test/test.js
new file mode 100644
index 00000000..37216683
--- /dev/null
+++ b/base/fliplr/test/test.js
@@ -0,0 +1,296 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2023 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 isndarrayLike = require( '@stdlib/assert/is-ndarray-like' );
+var isReadOnly = require( './../../../base/assert/is-read-only' );
+var zeroTo = require( '@stdlib/array/base/zero-to' );
+var typedarray = require( '@stdlib/array/typed' );
+var ndarray2array = require( './../../../to-array' );
+var baseCtor = require( './../../../base/ctor' );
+var scalar2ndarray = require( './../../../base/from-scalar' );
+var ctor = require( './../../../ctor' );
+var fliplr = require( './../lib' );
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof fliplr, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'when provided a zero-dimensional input array, the function returns a zero-dimensional array view (base)', function test( t ) {
+ var actual;
+ var x;
+
+ x = scalar2ndarray( 3.14, 'float64', 'row-major' );
+
+ actual = fliplr( x, false );
+ t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' );
+ t.strictEqual( actual.ndims, 0, 'returns expected value' );
+ t.strictEqual( actual.dtype, x.dtype, 'returns expected value' );
+ t.strictEqual( actual.get(), x.get(), 'returns expected value' );
+ t.strictEqual( actual.data, x.data, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'when provided a zero-dimensional input array, the function returns a zero-dimensional array view (base, offset)', function test( t ) {
+ var actual;
+ var x;
+
+ x = new baseCtor( 'float64', typedarray( zeroTo( 4 ), 'float64' ), [], [ 0 ], 3, 'row-major' );
+
+ actual = fliplr( x, false );
+ t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' );
+ t.strictEqual( actual.ndims, 0, 'returns expected value' );
+ t.strictEqual( actual.dtype, x.dtype, 'returns expected value' );
+ t.strictEqual( actual.get(), 3, 'returns expected value' );
+ t.strictEqual( actual.data, x.data, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'when provided a zero-dimensional input array, the function returns a zero-dimensional array view (non-base, offset, read-only)', function test( t ) {
+ var actual;
+ var x;
+
+ x = new ctor( 'float64', typedarray( zeroTo( 4 ), 'float64' ), [], [ 0 ], 3, 'row-major' );
+
+ actual = fliplr( x, false );
+ t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' );
+ t.strictEqual( actual.ndims, 0, 'returns expected value' );
+ t.strictEqual( actual.dtype, x.dtype, 'returns expected value' );
+ t.strictEqual( actual.get(), 3, 'returns expected value' );
+ t.strictEqual( actual.data, x.data, 'returns expected value' );
+ t.strictEqual( isReadOnly( actual ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'when provided a zero-dimensional input array, the function returns a zero-dimensional array view (non-base, offset, writable)', function test( t ) {
+ var actual;
+ var x;
+
+ x = new ctor( 'float64', typedarray( zeroTo( 4 ), 'float64' ), [], [ 0 ], 3, 'row-major' );
+
+ actual = fliplr( x, true );
+ t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' );
+ t.strictEqual( actual.ndims, 0, 'returns expected value' );
+ t.strictEqual( actual.dtype, x.dtype, 'returns expected value' );
+ t.strictEqual( actual.get(), 3, 'returns expected value' );
+ t.strictEqual( actual.data, x.data, 'returns expected value' );
+ t.strictEqual( isReadOnly( actual ), false, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function returns a view of a provided input array (ndims=1)', function test( t ) {
+ var expected;
+ var actual;
+ var buf;
+ var ord;
+ var sh;
+ var st;
+ var o;
+ var x;
+ var i;
+
+ buf = typedarray( zeroTo( 30 ), 'float64' );
+ sh = [ 6 ];
+ st = [ 2 ];
+ o = 4;
+ ord = 'row-major';
+
+ x = new ctor( 'float64', buf, sh, st, o, ord );
+
+ actual = fliplr( x, false );
+
+ t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' );
+ t.strictEqual( actual.ndims, 1, 'returns expected value' );
+ t.strictEqual( actual.length, 6, 'returns expected value' );
+ t.strictEqual( actual.dtype, x.dtype, 'returns expected value' );
+ t.strictEqual( actual.data, x.data, 'returns expected value' );
+ t.strictEqual( isReadOnly( actual ), true, 'returns expected value' );
+
+ expected = [ 14, 12, 10, 8, 6, 4 ];
+ for ( i = 0; i < expected.length; i++ ) {
+ t.strictEqual( actual.iget( i ), expected[ i ], 'returns expected value' );
+ }
+ t.end();
+});
+
+tape( 'the function returns a view of a provided input array (ndims=2)', function test( t ) {
+ var expected;
+ var actual;
+ var buf;
+ var ord;
+ var sh;
+ var st;
+ var o;
+ var x;
+
+ buf = typedarray( zeroTo( 30 ), 'float64' );
+ sh = [ 4, 3 ];
+ st = [ 6, 2 ];
+ o = 4;
+ ord = 'row-major';
+
+ x = new ctor( 'float64', buf, sh, st, o, ord );
+
+ actual = fliplr( x, false );
+
+ t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' );
+ t.strictEqual( actual.ndims, 2, 'returns expected value' );
+ t.deepEqual( actual.shape, [ 4, 3 ], 'returns expected value' );
+ t.strictEqual( actual.dtype, x.dtype, 'returns expected value' );
+ t.strictEqual( actual.data, x.data, 'returns expected value' );
+ t.strictEqual( isReadOnly( actual ), true, 'returns expected value' );
+
+ expected = [
+ [ 8, 6, 4 ],
+ [ 14, 12, 10 ],
+ [ 20, 18, 16 ],
+ [ 26, 24, 22 ]
+ ];
+ actual = ndarray2array( actual );
+ t.deepEqual( actual, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function returns a view of a provided input array (ndims=3)', function test( t ) {
+ var expected;
+ var actual;
+ var buf;
+ var ord;
+ var sh;
+ var st;
+ var o;
+ var x;
+
+ buf = typedarray( zeroTo( 100 ), 'float64' );
+ sh = [ 2, 4, 3 ];
+ st = [ 24, 6, 2 ];
+ o = 10;
+ ord = 'row-major';
+
+ x = new ctor( 'float64', buf, sh, st, o, ord );
+
+ actual = fliplr( x, false );
+
+ t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' );
+ t.strictEqual( actual.ndims, 3, 'returns expected value' );
+ t.deepEqual( actual.shape, [ 2, 4, 3 ], 'returns expected value' );
+ t.strictEqual( actual.dtype, x.dtype, 'returns expected value' );
+ t.strictEqual( actual.data, x.data, 'returns expected value' );
+ t.strictEqual( isReadOnly( actual ), true, 'returns expected value' );
+
+ expected = [
+ [
+ [ 14, 12, 10 ],
+ [ 20, 18, 16 ],
+ [ 26, 24, 22 ],
+ [ 32, 30, 28 ]
+ ],
+ [
+ [ 38, 36, 34 ],
+ [ 44, 42, 40 ],
+ [ 50, 48, 46 ],
+ [ 56, 54, 52 ]
+ ]
+ ];
+ actual = ndarray2array( actual );
+ t.deepEqual( actual, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'if provided an ndarray having a constructor supporting read-only instances, the function supports returning a writable view (non-base, ndims=1)', function test( t ) {
+ var expected;
+ var actual;
+ var buf;
+ var ord;
+ var sh;
+ var st;
+ var o;
+ var x;
+ var i;
+
+ buf = typedarray( zeroTo( 30 ), 'float64' );
+ sh = [ 6 ];
+ st = [ 2 ];
+ o = 4;
+ ord = 'row-major';
+
+ x = new ctor( 'float64', buf, sh, st, o, ord );
+
+ actual = fliplr( x, true );
+
+ t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' );
+ t.strictEqual( actual.ndims, 1, 'returns expected value' );
+ t.strictEqual( actual.length, 6, 'returns expected value' );
+ t.strictEqual( actual.dtype, x.dtype, 'returns expected value' );
+ t.strictEqual( actual.data, x.data, 'returns expected value' );
+ t.strictEqual( isReadOnly( actual ), false, 'returns expected value' );
+
+ expected = [ 14, 12, 10, 8, 6, 4 ];
+ for ( i = 0; i < expected.length; i++ ) {
+ t.strictEqual( actual.iget( i ), expected[ i ], 'returns expected value' );
+ }
+ t.end();
+});
+
+tape( 'if provided an ndarray having a constructor which does not support read-only instances, the function is not guaranteed to return either a read-only or writable view (base, ndims=1)', function test( t ) {
+ var expected;
+ var actual;
+ var buf;
+ var ord;
+ var sh;
+ var st;
+ var o;
+ var x;
+ var i;
+
+ buf = typedarray( zeroTo( 30 ), 'float64' );
+ sh = [ 6 ];
+ st = [ 2 ];
+ o = 4;
+ ord = 'row-major';
+
+ x = new baseCtor( 'float64', buf, sh, st, o, ord );
+
+ actual = fliplr( x, false );
+
+ t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' );
+ t.strictEqual( actual.ndims, 1, 'returns expected value' );
+ t.strictEqual( actual.length, 6, 'returns expected value' );
+ t.strictEqual( actual.dtype, x.dtype, 'returns expected value' );
+ t.strictEqual( actual.data, x.data, 'returns expected value' );
+ t.strictEqual( isReadOnly( actual ), false, 'returns expected value' );
+
+ expected = [ 14, 12, 10, 8, 6, 4 ];
+ for ( i = 0; i < expected.length; i++ ) {
+ t.strictEqual( actual.iget( i ), expected[ i ], 'returns expected value' );
+ }
+ t.end();
+});
diff --git a/base/lib/index.js b/base/lib/index.js
index 22465a25..a1c46913 100644
--- a/base/lib/index.js
+++ b/base/lib/index.js
@@ -301,6 +301,15 @@ setReadOnly( ns, 'emptyLike', require( './../../base/empty-like' ) );
*/
setReadOnly( ns, 'expandDimensions', require( './../../base/expand-dimensions' ) );
+/**
+* @name fliplr
+* @memberof ns
+* @readonly
+* @type {Function}
+* @see {@link module:@stdlib/ndarray/base/fliplr}
+*/
+setReadOnly( ns, 'fliplr', require( './../../base/fliplr' ) );
+
/**
* @name scalar2ndarray
* @memberof ns
diff --git a/dist/index.js b/dist/index.js
index 8b9e3d5e..13ba8a9a 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -1,4 +1,4 @@
-"use strict";var V=function(r,a){return function(){return a||r((a={exports:{}}).exports,a),a.exports}};var zv=V(function($Y,Dv){"use strict";function Uh(r){var a,e,i,t;for(a=r.length,e=[],t=0;t=0;t--)e[t]=i,i*=r[t];return e}function Fh(r){var a,e,i;for(a=[],e=1,i=0;i=0;t--)a[t]=i,i*=r[t];return a}function Gh(r,a){var e,i;for(e=1,i=0;it&&(i=!1),i||a)t=v;else return 0;return i&&a?3:i?1:2}Yv.exports=Hh});var Te=V(function(tK,Gv){"use strict";var $h=Kv();Gv.exports=$h});var Zv=V(function(sK,Jv){"use strict";function r6(r){var a,e,i;if(a=r.length,a===0)return 0;for(e=1,i=0;i0?v+=s*(r[o]-1):s<0&&(t+=s*(r[o]-1))}return[t,v]}ht.exports=j6});var wt=V(function(SK,St){"use strict";function E6(r,a,e,i){var t,v,s,o,u;for(t=r.length,v=e,s=e,u=0;u0?s+=o*(r[u]-1):o<0&&(v+=o*(r[u]-1))}return i[0]=v,i[1]=s,i}St.exports=E6});var ye=V(function(wK,Et){"use strict";var _6=require("@stdlib/utils/define-nonenumerable-read-only-property"),jt=bt(),O6=wt();_6(jt,"assign",O6);Et.exports=jt});var Ot=V(function(jK,_t){"use strict";var T6=ye();function k6(r,a,e,i){var t=T6(a,e,i);return t[0]>=0&&t[1]=0;s--)v=r%e[s],r-=v,r/=e[s],t+=v*a[s];return this._accessors?this._buffer.get(t):this._buffer[t]}Yt.exports=U6});var Jt=V(function(CK,Gt){"use strict";function F6(r,a){var e,i,t,v,s,o;if(t=this._ndims,t===0)return this._accessors?this._buffer.set(r,this._offset):this._buffer[this._offset]=r,this;if(this._flags.ROW_MAJOR_CONTIGUOUS||this._flags.COLUMN_MAJOR_CONTIGUOUS){if(this._iterationOrder===1)return this._accessors?this._buffer.set(a,this._offset+r):this._buffer[this._offset+r]=a,this;if(this._iterationOrder===-1)return this._accessors?this._buffer.set(a,this._offset-r):this._buffer[this._offset-r]=a,this}if(i=this._shape,e=this._strides,v=this._offset,this._order==="column-major"){for(o=0;o=0;o--)s=r%i[o],r-=s,r/=i[o],v+=s*e[o];return this._accessors?this._buffer.set(a,v):this._buffer[v]=a,this}Gt.exports=F6});var Xt=V(function(LK,Zt){"use strict";function Y6(){var r,a;for(r=this._offset,a=0;a=0;s--)v=this.iget(this._length-1-s),r+=di(v)+", "+li(v),s>0&&(r+=", ");else for(s=2;s>=0;s--)r+=this.iget(this._length-1-s),s>0&&(r+=", ")}if(e=W6[this.dtype],i+=X6(e,"{{data}}",r),i+=", ",a===0?i+="[]":i+="[ "+this._shape.join(", ")+" ]",i+=", ",i+="[ ",a===0)i+="0";else for(s=0;sa?a:r}ws.exports=Kb});var pi=V(function($K,Es){"use strict";var Gb=js();Es.exports=Gb});var Os=V(function(rG,_s){"use strict";function Jb(r,a){var e=a+1;return r<0?(r+=e,r<0&&(r%=e,r!==0&&(r+=e)),r):(r>a&&(r-=e,r>a&&(r%=e)),r)}_s.exports=Jb});var mi=V(function(eG,Ts){"use strict";var Zb=Os();Ts.exports=Zb});var Is=V(function(aG,ks){"use strict";var Xb=pi(),Wb=mi(),Qb=require("@stdlib/string/format");function Hb(r,a,e){if(e==="clamp")return Xb(r,a);if(e==="wrap")return Wb(r,a);if(r<0||r>a)throw new RangeError(Qb("invalid argument. Index must be on the interval: [0, %d]. Value: `%d`.",a,r));return r}ks.exports=Hb});var Le=V(function(iG,As){"use strict";var $b=Is();As.exports=$b});var Ds=V(function(vG,Rs){"use strict";var r5=require("@stdlib/assert/is-integer").isPrimitive,e5=Le(),a5=ee(),i5=require("@stdlib/string/format"),Ns=a5.prototype.iget;function v5(r){if(this._ndims>0){if(!r5(r))throw new TypeError(i5("invalid argument. Index must be an integer. Value: `%s`.",r));return r=e5(r,this._length-1,this._mode),Ns.call(this,r)}return Ns.call(this)}Rs.exports=v5});var Ls=V(function(tG,Cs){"use strict";var t5=require("@stdlib/assert/is-integer").isPrimitive,s5=Le(),o5=ee(),n5=require("@stdlib/string/format"),zs=o5.prototype.iset;function u5(r,a){if(this._flags.READONLY)throw new Error("invalid invocation. Cannot write to a read-only array.");if(this._ndims>0){if(!t5(r))throw new TypeError(n5("invalid argument. Index must be an integer. Value: `%s`.",r));r=s5(r,this._length-1,this._mode),zs.call(this,r,a)}else zs.call(this,r);return this}Cs.exports=u5});var Ms=V(function(sG,Vs){"use strict";var f5=require("@stdlib/assert/is-integer").isPrimitive,d5=Le(),Ps=require("@stdlib/string/format");function l5(){var r,a,e,i;if(arguments.length!==this._ndims)throw new RangeError(Ps("invalid arguments. Number of indices must match the number of dimensions. ndims: `%u`. nargs: `%u`.",this._ndims,arguments.length));for(r=this._offset,e=this._submode.length,i=0;i0))throw new TypeError(ne("invalid argument. Third argument must be an array-like object containing nonnegative integers. Value: `%s`.",e));if(o=e.length,o>ao)throw new RangeError(ne("invalid argument. Number of dimensions must not exceed %u due to stack limits. Value: `%u`.",ao,o));if(!O5(i))throw new TypeError(ne("invalid argument. Fourth argument must be an array-like object containing integers. Value: `%s`.",i));if(o>0){if(i.length!==o)throw new RangeError(ne("invalid argument. Fourth argument length must match the number of dimensions. Expected number of dimensions: `%u`. Strides length: `%u`.",o,i.length))}else{if(i.length!==1)throw new RangeError("invalid argument. Fourth argument length must be equal to 1 when creating a zero-dimensional ndarray.");if(i[0]!==0)throw new RangeError(ne("invalid argument. Fourth argument must contain a single element equal to 0. Value: `%d`.",i[0]))}if(!_5(t))throw new TypeError(ne("invalid argument. Fifth argument must be a nonnegative integer. Value: `%s`.",t));if(!T5(v))throw new TypeError(ne("invalid argument. Sixth argument must be a supported order. Value: `%s`.",v));if(o>0&&!I5(a.length,e,i,t)&&A5(e)>0)throw new Error("invalid arguments. Input buffer is incompatible with the specified meta data. Ensure that the offset is valid with regard to the strides array and that the buffer has enough elements to satisfy the desired array shape.");if(u={},u.mode=V5,u.readonly=M5,arguments.length>6&&(f=P5(u,s),f))throw f;return this._mode=u.mode,u.submode===void 0&&(u.submode=[this._mode]),this._submode=u.submode,n=eo(e,o),d=eo(i,o||1),io.call(this,r,a,n,d,t,v),this._flags.READONLY=u.readonly,this}R5(ue,io);ea(ue,"name","ndarray");ea(ue.prototype,"get",C5);ea(ue.prototype,"iget",D5);ea(ue.prototype,"set",L5);ea(ue.prototype,"iset",z5);vo.exports=ue});var fe=V(function(cG,so){"use strict";var B5=to();so.exports=B5});var oo=V(function(yG,U5){U5.exports=["none","equiv","safe","mostly-safe","same-kind","unsafe"]});var uo=V(function(pG,no){"use strict";var F5=oo();function Y5(){return F5.slice()}no.exports=Y5});var lo=V(function(mG,fo){"use strict";function K5(){return{none:0,equiv:1,safe:2,"mostly-safe":3,"same-kind":4,unsafe:5}}fo.exports=K5});var gi=V(function(xG,yo){"use strict";var G5=require("@stdlib/utils/define-nonenumerable-read-only-property"),co=uo(),J5=lo();G5(co,"enum",J5);yo.exports=co});var xo=V(function(gG,mo){"use strict";var Z5=gi(),po=Z5(),X5=po.length;function W5(r){var a;for(a=0;a0}Ro.exports=hS});var wa=V(function(IG,zo){"use strict";var bS=Do();zo.exports=bS});var Co=V(function(AG,SS){SS.exports={float64:{float64:1,float32:1,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,binary:0,generic:1},float32:{float64:1,float32:1,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,binary:0,generic:1},int32:{float64:1,float32:0,int32:1,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:0,binary:0,generic:1},int16:{float64:1,float32:1,int32:1,int16:1,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,binary:0,generic:1},int8:{float64:1,float32:1,int32:1,int16:1,int8:1,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,binary:0,generic:1},uint32:{float64:1,float32:0,int32:0,int16:0,int8:0,uint32:1,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:0,binary:0,generic:1},uint16:{float64:1,float32:1,int32:1,int16:0,int8:0,uint32:1,uint16:1,uint8:0,uint8c:0,complex128:1,complex64:1,binary:0,generic:1},uint8:{float64:1,float32:1,int32:1,int16:1,int8:0,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:1,binary:0,generic:1},uint8c:{float64:1,float32:1,int32:1,int16:1,int8:0,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:1,binary:0,generic:1},complex128:{float64:0,float32:0,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,binary:0,generic:1},complex64:{float64:0,float32:0,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,binary:0,generic:1},generic:{float64:0,float32:0,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,binary:0,generic:1},binary:{float64:0,float32:0,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,binary:1,generic:0}}});var Vo=V(function(NG,Po){"use strict";var Lo=require("@stdlib/utils/keys"),wS=require("@stdlib/assert/has-own-property"),jS=ae(),Ea=Co(),ja;function ES(){var r,a,e,i,t,v,s,o,u;for(e={},r=Lo(Ea),a=r.length,u=0;u0}Bo.exports=AS});var _a=V(function(zG,Fo){"use strict";var NS=Uo();Fo.exports=NS});var Yo=V(function(CG,RS){RS.exports={float64:{float64:1,float32:1,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:0,binary:0,generic:1},float32:{float64:1,float32:1,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,binary:0,generic:1},int32:{float64:1,float32:0,int32:1,int16:1,int8:1,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:0,binary:0,generic:1},int16:{float64:1,float32:1,int32:1,int16:1,int8:1,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,binary:0,generic:1},int8:{float64:1,float32:1,int32:1,int16:1,int8:1,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,binary:0,generic:1},uint32:{float64:1,float32:0,int32:0,int16:0,int8:0,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:0,binary:0,generic:1},uint16:{float64:1,float32:1,int32:1,int16:0,int8:0,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:1,binary:0,generic:1},uint8:{float64:1,float32:1,int32:1,int16:1,int8:0,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:1,binary:0,generic:1},uint8c:{float64:1,float32:1,int32:1,int16:1,int8:0,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:1,binary:0,generic:1},complex128:{float64:0,float32:0,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,binary:0,generic:0},complex64:{float64:0,float32:0,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,binary:0,generic:0},generic:{float64:0,float32:0,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,binary:0,generic:1},binary:{float64:0,float32:0,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,binary:1,generic:0}}});var Jo=V(function(LG,Go){"use strict";var Ko=require("@stdlib/utils/keys"),DS=require("@stdlib/assert/has-own-property"),zS=ae(),Ta=Yo(),Oa;function CS(){var r,a,e,i,t,v,s,o,u;for(e={},r=Ko(Ta),a=r.length,u=0;u0}Xo.exports=US});var wi=V(function(MG,Qo){"use strict";var FS=Wo();Qo.exports=FS});var $o=V(function(BG,Ho){"use strict";var YS=wa(),KS=_a(),GS=wi();function JS(r,a,e){return e==="unsafe"||r===a?!0:e==="none"||e==="equiv"?!1:e==="safe"?YS(r,a):e==="mostly-safe"?KS(r,a):GS(r,a)}Ho.exports=JS});var ji=V(function(UG,rn){"use strict";var ZS=$o();rn.exports=ZS});var an=V(function(FG,en){"use strict";var XS=require("@stdlib/buffer/ctor"),WS=require("@stdlib/array/float64"),QS=require("@stdlib/array/float32"),HS=require("@stdlib/array/int16"),$S=require("@stdlib/array/int32"),r8=require("@stdlib/array/int8"),e8=require("@stdlib/array/uint16"),a8=require("@stdlib/array/uint32"),i8=require("@stdlib/array/uint8"),v8=require("@stdlib/array/uint8c"),t8=require("@stdlib/array/complex64"),s8=require("@stdlib/array/complex128"),o8={binary:XS,float64:WS,float32:QS,generic:Array,int16:HS,int32:$S,int8:r8,uint16:e8,uint32:a8,uint8:i8,uint8c:v8,complex64:t8,complex128:s8};en.exports=o8});var tn=V(function(YG,vn){"use strict";var n8=an();function u8(r){return n8[r]||null}vn.exports=u8});var ia=V(function(KG,sn){"use strict";var f8=tn();sn.exports=f8});var nn=V(function(GG,on){"use strict";function d8(r){var a;for(a=0;a=0&&r.length=pj(a)}xu.exports=mj});var hu=V(function(wJ,qu){"use strict";var xj=gu();qu.exports=xj});var wu=V(function(jJ,Su){"use strict";var bu=require("@stdlib/math/base/special/abs");function gj(r){var a,e,i,t;if(a=r.length,a===0)return!1;for(e=bu(r[0]),t=1;te)return!1;e=i}return!0}tf.exports=t7});var Ri=V(function(JJ,of){"use strict";var s7=sf();of.exports=s7});var uf=V(function(ZJ,nf){"use strict";var o7=va(),n7=oe(),u7=Ri();function f7(r,a,e){return n7(a)!==0&&u7(a)&&o7(r,a,e)}nf.exports=f7});var df=V(function(XJ,ff){"use strict";var d7=uf();ff.exports=d7});var cf=V(function(WJ,lf){"use strict";var l7=require("@stdlib/array/base/assert/contains").factory,c7=Fr(),y7=l7(c7("signed_integer"));lf.exports=y7});var za=V(function(QJ,yf){"use strict";var p7=cf();yf.exports=p7});var mf=V(function(HJ,pf){"use strict";var m7=require("@stdlib/array/base/assert/contains").factory,x7=Fr(),g7=m7(x7("unsigned_integer"));pf.exports=g7});var Ca=V(function($J,xf){"use strict";var q7=mf();xf.exports=q7});var qf=V(function(rZ,gf){"use strict";var Pr=require("@stdlib/utils/define-read-only-property"),Lr={};Pr(Lr,"isAllowedDataTypeCast",ji());Pr(Lr,"isBufferLengthCompatible",fi());Pr(Lr,"isBufferLengthCompatibleShape",hu());Pr(Lr,"isCastingMode",qi());Pr(Lr,"isColumnMajor",ki());Pr(Lr,"isColumnMajorContiguous",Au());Pr(Lr,"isComplexFloatingPointDataType",ta());Pr(Lr,"isContiguous",Pu());Pr(Lr,"isDataType",Ce());Pr(Lr,"isFloatingPointDataType",Ra());Pr(Lr,"isIndexMode",ra());Pr(Lr,"isIntegerDataType",Ii());Pr(Lr,"isMostlySafeDataTypeCast",_a());Pr(Lr,"isNumericDataType",Ai());Pr(Lr,"isOrder",$r());Pr(Lr,"isReadOnly",je());Pr(Lr,"isRealDataType",Da());Pr(Lr,"isRealFloatingPointDataType",Ni());Pr(Lr,"isRowMajor",Ri());Pr(Lr,"isRowMajorContiguous",df());Pr(Lr,"isSafeDataTypeCast",wa());Pr(Lr,"isSameKindDataTypeCast",wi());Pr(Lr,"isSignedIntegerDataType",za());Pr(Lr,"isSingleSegmentCompatible",va());Pr(Lr,"isUnsignedIntegerDataType",Ca());gf.exports=Lr});var bf=V(function(eZ,hf){"use strict";function h7(r){return r.dtype}hf.exports=h7});var Zr=V(function(aZ,Sf){"use strict";var b7=bf();Sf.exports=b7});var jf=V(function(iZ,wf){"use strict";var S7=require("@stdlib/array/base/copy-indexed");function w7(r,a){var e=r.shape;return a?S7(e):e}wf.exports=w7});var Kr=V(function(vZ,Ef){"use strict";var j7=jf();Ef.exports=j7});var Of=V(function(tZ,_f){"use strict";var E7=Yr(),_7=require("@stdlib/array/base/copy-indexed"),O7="row-major";function T7(r,a){var e,i,t;return t=r.strides,typeof t!="object"||t===null?(i=r.shape,i.length===0?[0]:(e=r.order,typeof e!="string"&&(e=O7),E7(i,e))):a?_7(t):t}_f.exports=T7});var se=V(function(sZ,Tf){"use strict";var k7=Of();Tf.exports=k7});var If=V(function(oZ,kf){"use strict";var I7=Gr();function A7(r){var a,e,i;return i=r.offset,typeof i=="number"?i:(e=r.shape,e.length===0||(a=r.strides,typeof a!="object"||a===null)?0:I7(e,a))}kf.exports=A7});var de=V(function(nZ,Af){"use strict";var N7=If();Af.exports=N7});var Rf=V(function(uZ,Nf){"use strict";var R7=Te(),Di="row-major",D7="column-major";function z7(r){var a,e;return e=r.order,typeof e=="string"?e:(a=r.strides,typeof a!="object"||a===null||(e=R7(a),e===1||e===3)?Di:e===2?D7:r.shape.length===0?Di:null)}Nf.exports=z7});var Xr=V(function(fZ,Df){"use strict";var C7=Rf();Df.exports=C7});var Cf=V(function(dZ,zf){"use strict";function L7(r){return r.data}zf.exports=L7});var me=V(function(lZ,Lf){"use strict";var P7=Cf();Lf.exports=P7});var Vf=V(function(cZ,Pf){"use strict";var V7=require("@stdlib/array/base/assert/is-accessor-array"),M7=require("@stdlib/array/base/accessor-getter"),B7=require("@stdlib/array/base/accessor-setter"),U7=require("@stdlib/array/base/getter"),F7=require("@stdlib/array/base/setter"),Y7=Cr(),K7=Zr(),G7=Kr(),J7=se(),Z7=de(),X7=Xr(),W7=me();function Q7(r){var a,e,i,t;return a=W7(r),i=G7(r,!0),t=K7(r),e=V7(a),{ref:r,dtype:t,data:a,length:Y7(i),shape:i,strides:J7(r,!0),offset:Z7(r),order:X7(r),accessorProtocol:e,accessors:e?[M7(t),B7(t)]:[U7(t),F7(t)]}}Pf.exports=Q7});var Be=V(function(yZ,Mf){"use strict";var H7=Vf();Mf.exports=H7});var Uf=V(function(pZ,Bf){"use strict";function $7(r,a){var e,i,t,v,s,o,u,f,n,d;for(t=1,v=1,d=1;d=0&&(n=r[s],i=n<0?-n:n,!(i<=e));)r[s+1]=n,a[o+1]=a[o],s-=1,o-=1;r[s+1]=u,a[o+1]=f,t+=1,v+=1}}Bf.exports=$7});var Kf=V(function(mZ,Yf){"use strict";var rE=require("@stdlib/array/base/zero-to"),eE=require("@stdlib/array/base/copy-indexed"),Ff=require("@stdlib/array/base/take"),aE=Uf();function iE(r,a,e){var i;return i=rE(r.length),a=eE(a),aE(a,i),r=Ff(r,i),e=Ff(e,i),{sh:r,sx:a,sy:e}}Yf.exports=iE});var kr=V(function(xZ,Gf){"use strict";var vE=Kf();Gf.exports=vE});var Zf=V(function(gZ,Jf){"use strict";var tE={BLOCK_SIZE_IN_BYTES:64,BLOCK_SIZE_IN_ELEMENTS:8};Jf.exports=tE});var Qf=V(function(qZ,Wf){"use strict";var Xf=qe(),zi=Zf();function sE(r,a){var e,i;return e=Xf(r),i=Xf(a),e===null||i===null?zi.BLOCK_SIZE_IN_ELEMENTS:e>i?zi.BLOCK_SIZE_IN_BYTES/e|0:zi.BLOCK_SIZE_IN_BYTES/i|0}Wf.exports=sE});var Ir=V(function(hZ,Hf){"use strict";var oE=Qf();Hf.exports=oE});var rd=V(function(bZ,$f){"use strict";var nE=kr(),uE=Ir();function fE(r,a){var e,i,t,v,s,o,u,f,n,d,q,E,y,p,h,m,j,T,x,S,w,l,g,c,b;for(b=nE(r.shape,r.strides,a.strides),E=b.sh,h=b.sx,m=b.sy,e=uE(r.dtype,a.dtype),j=r.offset,T=a.offset,i=r.data,t=a.data,o=h[0],f=m[0],v=r.accessors[0],s=a.accessors[1],c=E[1];c>0;)for(c0;)for(g0;)for(k0;)for(R0;)for(N0;)for(M0;)for(P0;)for(L0;)for(C0;)for(J0;)for(Y0;)for(G0;)for(K0;)for(F0;)for(er0;)for(H0;)for($0;)for(X0;)for(Q0;)for(W0;)for(or0;)for(sr0;)for(tr0;)for(ar0;)for(vr0;)for(rr0;)for(ir0;)for(yr0;)for(lr0;)for(cr0;)for(fr0;)for(dr0;)for(ur0;)for(nr0;)for(or0;)for(br0;)for(mr0;)for(qr0;)for(gr0;)for(hr0;)for(xr0;)for(pr0;)for(yr0;)for(lr0;)for(Nr0;)for(Ar0;)for(Tr0;)for(Or0;)for(_r0;)for(Er0;)for(Sr0;)for(br0;)for(mr0;)for(qr0;)for(l0;)for(w0;)for(N0;)for(O0;)for(A0;)for(L0;)for(C0;)for(I0;)for(z0;)for(G0;)for(K0;)for(F0;)for(U0;)for(B0;)for($0;)for(X0;)for(Q0;)for(W0;)for(Z0;)for(J0;)for(tr0;)for(ar0;)for(vr0;)for(rr0;)for(ir0;)for(er0;)for(H0;)for(cr0;)for(fr0;)for(dr0;)for(ur0;)for(nr0;)for(or0;)for(sr0;)for(tr0;)for(qr0;)for(gr0;)for(hr0;)for(xr0;)for(pr0;)for(yr0;)for(lr0;)for(cr0;)for(fr0;)for(Tr0;)for(Or0;)for(_r0;)for(Er0;)for(Sr0;)for(br0;)for(mr0;)for(qr0;)for(gr0;)for(hr=o&&(t=o-1);else if(v==="wrap")t<0?(t+=o,t<0&&(t%=o,t!==0&&(t+=o))):t>=o&&(t-=o,t>=o&&(t%=o));else if(t<0||t>=o)throw new RangeError(q_("invalid argument. Linear index must not exceed array dimensions. Number of array elements: `%u`. Value: `%d`.",o,t));if(u=e,i==="column-major"){for(n=0;n=0;n--)f=t%r[n],t-=f,t/=r[n],u+=f*a[n];return u}i0.exports=h_});var le=V(function(QZ,t0){"use strict";var b_=v0();t0.exports=b_});var u0=V(function(HZ,n0){"use strict";var S_=Cr(),s0=le(),o0="throw";function w_(r,a){var e,i,t,v,s,o,u,f,n,d,q,E,y,p,h;for(f=r.shape,s=S_(f),e=r.data,i=a.data,n=r.strides,d=a.strides,q=r.offset,E=a.offset,t=r.order,v=a.order,o=r.accessors[0],u=a.accessors[1],h=0;h=0&&(n=r[s],i=n<0?-n:n,!(i<=e));)r[s+1]=n,a[o+1]=a[o],s-=1,o-=1;r[s+1]=u,a[o+1]=f,t+=1,v+=1}}F0.exports=RO});var J0=V(function(yX,G0){"use strict";var DO=require("@stdlib/array/base/zero-to"),zO=require("@stdlib/array/base/copy-indexed"),La=require("@stdlib/array/base/take"),CO=require("@stdlib/array/base/filled"),Li=Te(),LO=Y0(),K0=3;function PO(r,a,e,i){var t,v,s,o,u,f,n,d,q,E;if(t=DO(r.length),f=Li(a),n=Li(e),d=Li(i),v=CO([],4),v[f].push(a),v[n].push(e),v[d].push(i),s=v[0].length,s===K0)u=a;else if(s===K0-1){for(q=1;q<4;q++)if(v[q].length){u=v[q][0];break}}else{for(E=0,q=1;q<4;q++)o=v[q].length,o>=s&&(s=o,E=q);u=v[E][0]}return u=zO(u),LO(u,t),r=La(r,t),a=a===u?u:La(a,t),e=e===u?u:La(e,t),i=i===u?u:La(i,t),{sh:r,sx:a,sy:e,sz:i}}G0.exports=PO});var X0=V(function(pX,Z0){"use strict";var VO=J0();Z0.exports=VO});var Q0=V(function(mX,W0){"use strict";var MO={BLOCK_SIZE_IN_BYTES:64,BLOCK_SIZE_IN_ELEMENTS:8};W0.exports=MO});var $0=V(function(xX,H0){"use strict";var Pi=qe(),Pa=Q0();function BO(r,a,e){var i,t,v;return i=Pi(r),t=Pi(a),v=Pi(e),i===null||t===null||v===null?Pa.BLOCK_SIZE_IN_ELEMENTS:i>t&&i>v?Pa.BLOCK_SIZE_IN_BYTES/i|0:t>v?Pa.BLOCK_SIZE_IN_BYTES/t|0:Pa.BLOCK_SIZE_IN_BYTES/v|0}H0.exports=BO});var el=V(function(gX,rl){"use strict";var UO=$0();rl.exports=UO});var vl=V(function(qX,il){"use strict";var FO=require("@stdlib/string/format"),Va=require("@stdlib/math/base/special/trunc"),al=require("@stdlib/math/base/special/abs");function YO(r,a,e,i,t,v){var s,o,u,f,n,d;for(s=r.length,o=1,d=0;d=o&&(t=o-1);else if(v==="wrap")t<0?(t+=o,t<0&&(t%=o,t!==0&&(t+=o))):t>=o&&(t-=o,t>=o&&(t%=o));else if(t<0||t>=o)throw new RangeError(FO("invalid argument. Linear index must not exceed array dimensions. Number of array elements: `%u`. Value: `%d`.",o,t));if(u=0,i==="column-major"){for(d=s-1;d>=0;d--)n=a[d],n<0?(f=Va(t/n),t-=f*n,f+=r[d]-1):(f=Va(t/n),t-=f*n),u+=f*al(n);return u}for(d=0;d=0;f--)if(n=o-s+f,!(n<0)){if(u=t[n],i=a[f],i!==0&&if&&(f=a[n]);for(n=0;n=0;){for(v=a[0]-f+n,v>=0?i=t[v]:i=1,d=1;d=0?o=r[d][s]:o=1,i===1){i=o;continue}if(!(o===1||i===o))return null}e[n]=i,n-=1}return e}pl.exports=fT});var gl=V(function(_X,xl){"use strict";var dT=ml();xl.exports=dT});var hl=V(function(OX,ql){"use strict";var lT=aa(),cT=ka();function yT(r){var a=cT(r);return a?lT(a):null}ql.exports=yT});var Sl=V(function(TX,bl){"use strict";var pT=hl();bl.exports=pT});var jl=V(function(kX,wl){"use strict";function mT(){return{binary:"r",bool:"x",complex64:"c",complex128:"z",float16:"h",bfloat16:"e",float32:"f",float64:"d",float128:"g",generic:"o",int8:"s",int16:"k",int32:"i",int64:"l",int128:"m",int256:"n",uint8:"b",uint8c:"a",uint16:"t",uint32:"u",uint64:"v",uint128:"w",uint256:"y"}}wl.exports=mT});var Ol=V(function(IX,_l){"use strict";var xT=ae(),El=jl(),Vi;function gT(r){return arguments.length===0?El():(Vi===void 0&&(Vi=El()),Vi[xT(r)]||null)}_l.exports=gT});var Mi=V(function(AX,Tl){"use strict";var qT=Ol();Tl.exports=qT});var Nl=V(function(NX,Al){"use strict";var kl=require("@stdlib/utils/object-inverse"),Il=Mi(),Bi;function hT(r){return arguments.length===0?kl(Il()):(Bi===void 0&&(Bi=kl(Il())),Bi[r]||null)}Al.exports=hT});var Dl=V(function(RX,Rl){"use strict";var bT=Nl();Rl.exports=bT});var Cl=V(function(DX,zl){"use strict";function ST(){return{binary:"byte",bool:"boolean",complex64:"single-precision floating-point complex number",complex128:"double-precision floating-point complex number",float16:"half-precision floating-point number",bfloat16:"brain floating-point number",float32:"single-precision floating-point number",float64:"double-precision floating-point number",float128:"quadruple-precision floating-point number",generic:"generic array value",int8:"signed 8-bit integer",int16:"signed 16-bit integer",int32:"signed 32-bit integer",int64:"signed 64-bit integer",int128:"signed 128-bit integer",int256:"signed 256-bit integer",uint8:"unsigned 8-bit integer",uint8c:"unsigned 8-bit integer (clamped)",uint16:"unsigned 16-bit integer",uint32:"unsigned 32-bit integer",uint64:"unsigned 64-bit integer",uint128:"unsigned 128-bit integer",uint256:"unsigned 256-bit integer"}}zl.exports=ST});var Vl=V(function(zX,Pl){"use strict";var wT=ae(),Ll=Cl(),Ui;function jT(r){return arguments.length===0?Ll():(Ui===void 0&&(Ui=Ll()),Ui[wT(r)]||null)}Pl.exports=jT});var Bl=V(function(CX,Ml){"use strict";var ET=Vl();Ml.exports=ET});var Fl=V(function(LX,Ul){"use strict";var _T=ha(),OT=aa();function TT(r){var a=typeof r;return a==="number"?_T(r)?r:null:a==="string"?OT(r):null}Ul.exports=TT});var Fi=V(function(PX,Yl){"use strict";var kT=Fl();Yl.exports=kT});var Kl=V(function(VX,IT){IT.exports={binary:null,bool:"bool",complex64:"stdlib_complex64_t",complex128:"stdlib_complex128_t",float16:null,bfloat16:null,float32:"float",float64:"double",float128:null,generic:null,int8:"int8_t",int16:"int16_t",int32:"int32_t",int64:"int64_t",int128:null,int256:null,uint8:"uint8_t",uint8c:null,uint16:"uint16_t",uint32:"uint32_t",uint64:"uint64_t",uint128:null,uint256:null}});var Jl=V(function(MX,Gl){"use strict";var AT=ae(),NT=Kl();function RT(r){return NT[AT(r)]||null}Gl.exports=RT});var Xl=V(function(BX,Zl){"use strict";var DT=Jl();Zl.exports=DT});var Hl=V(function(UX,Ql){"use strict";var zT=require("@stdlib/assert/is-array-like-object"),Wl=require("@stdlib/assert/is-nonnegative-integer").isPrimitive,CT=ae(),Yi=require("@stdlib/string/format");function LT(r,a,e){var i,t,v,s,o,u,f,n;if(!zT(r))throw new TypeError(Yi("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(!Wl(a))throw new TypeError(Yi("invalid argument. Second argument must be a nonnegative integer. Value: `%s`.",a));if(!Wl(e))throw new TypeError(Yi("invalid argument. Third argument must be a nonnegative integer. Value: `%s`.",e));if(i=r.length,i===0)throw new RangeError("invalid argument. First argument must contain at least one element.");if(o=a+e,i%o!==0)throw new RangeError("invalid arguments. Length of the first argument is incompatible with the second and third arguments.");for(t=[],v=[],u=2*o,n=2*a,f=0;f<=u;f++)f===0?f===n?v.push("() => ("):v.push("("):f===u?f===n?v.push(") => ()"):v.push(")"):f===n?v.push(") => ("):f%2===1?v.push(""):v.push(", ");for(f=0;f0?(v=UT(a),s=VT(a,e)):(v=1,s=[0]),r==="binary"?t=YT(v):t=FT(v,r),new BT(r,t,a,s,MT(a,s),e)}r1.exports=KT});var i1=V(function(KX,a1){"use strict";var GT=e1();a1.exports=GT});var t1=V(function(GX,v1){"use strict";var JT=Yr(),ZT=Gr(),XT=Cr(),WT=Zr(),QT=Kr(),HT=Xr(),$T=require("@stdlib/array/empty"),rk=require("@stdlib/buffer/alloc-unsafe");function ek(r){var a,e,i,t,v,s,o;return o=WT(r),v=QT(r,!0),t=HT(r),a=v.length,a>0?(e=XT(v),s=JT(v,t)):(e=1,s=[0]),o==="binary"?i=rk(e):i=$T(e,o),new r.constructor(o,i,v,s,ZT(v,s),t)}v1.exports=ek});var o1=V(function(JX,s1){"use strict";var ak=t1();s1.exports=ak});var c1=V(function(ZX,l1){"use strict";var ik=je(),n1=Zr(),vk=Kr(),tk=se(),u1=de(),sk=Xr(),f1=me(),d1=require("@stdlib/string/format");function ok(r,a){var e,i,t,v,s,o,u;if(v=vk(r,!1),s=tk(r,!1),t=sk(r),o=v.length,e=[],i=[],a<0){if(a<-o-1)throw new RangeError(d1("invalid argument. Specified axis is out-of-bounds. Must be on the interval: [-%u-1, %u]. Value: `%d`.",o,o,a));a+=o+1}else if(a>o)throw new RangeError(d1("invalid argument. Specified axis is out-of-bounds. Must be on the interval: [-%u-1, %u]. Value: `%d`.",o,o,a));if(a===0)for(i.push(1),e.push(s[0]),u=0;u=u&&(t=u-1);else if(v==="wrap")t<0?(t+=u,t<0&&(t%=u,t!==0&&(t+=u))):t>=u&&(t-=u,t>=u&&(t%=u));else if(t<0||t>=u)throw new RangeError(xk("invalid argument. Linear index must not exceed array dimensions. Number of array elements: `%u`. Value: `%d`.",u,t));if(e===0){if(i==="column-major"){for(d=0;d=0;d--)n=t%r[d],t-=n,t/=r[d],s[d]=n;return s}if(i==="column-major"){for(d=o-1;d>=0;d--)n=a[d],n<0?(f=Ba(t/n),t-=f*n,s[d]=r[d]-1+f):(f=Ba(t/n),t-=f*n,s[d]=f);return s}for(d=0;d0&&(t+=a[v]*(r[v]-1))}return t}E1.exports=wk});var T1=V(function(aW,O1){"use strict";var jk=_1();O1.exports=jk});var A1=V(function(iW,I1){"use strict";var k1=Ma(),Ek=Kr();function _k(r,a){var e,i,t;if(i=a.length,e=Ek(r,!1),e.length===i){for(t=0;ti;v--)t[v]=e[v];for(v=i;v>=0&&(s=(e[v]+1)%a[v],t[v]=s,!(s>0));v--);for(v-=1;v>=0;v--)t[v]=e[v];return t}function Pk(r,a,e,i,t){var v,s;for(v=0;v0));v++);for(v+=1;v=v)return null;return a===Ck?Lk(v,r,e,i,t):Pk(v,r,e,i,t)}K1.exports=Vk});var J1=V(function(lW,G1){"use strict";var Mk=require("@stdlib/array/base/zeros"),Bk=Zi();function Uk(r,a,e,i){return Bk(r,a,e,i,Mk(r.length))}G1.exports=Uk});var Ne=V(function(cW,X1){"use strict";var Fk=require("@stdlib/utils/define-nonenumerable-read-only-property"),Z1=J1(),Yk=Zi();Fk(Z1,"assign",Yk);X1.exports=Z1});var Q1=V(function(yW,W1){"use strict";function Kk(r){var a,e;for(a=0,e=0;e=0&&(n=r[s],i=n<0?-n:n,!(i<=e));)r[s+1]=n,a[o+1]=a[o],s-=1,o-=1;r[s+1]=u,a[o+1]=f,t+=1,v+=1}}rc.exports=Jk});var ic=V(function(xW,ac){"use strict";var Zk=require("@stdlib/array/base/zero-to"),Xk=require("@stdlib/array/base/copy-indexed"),Wk=require("@stdlib/array/base/take"),Qk=ec();function Hk(r,a){var e;return e=Zk(r.length),a=Xk(a),Qk(a,e),r=Wk(r,e),{sh:r,sx:a}}ac.exports=Hk});var Mr=V(function(gW,vc){"use strict";var $k=ic();vc.exports=$k});var sc=V(function(qW,tc){"use strict";var rI={BLOCK_SIZE_IN_BYTES:64,BLOCK_SIZE_IN_ELEMENTS:8};tc.exports=rI});var uc=V(function(hW,nc){"use strict";var eI=qe(),oc=sc();function aI(r){var a=eI(r);return a===null?oc.BLOCK_SIZE_IN_ELEMENTS:oc.BLOCK_SIZE_IN_BYTES/a|0}nc.exports=aI});var Br=V(function(bW,fc){"use strict";var iI=uc();fc.exports=iI});var lc=V(function(SW,dc){"use strict";var vI=Mr(),tI=Br();function sI(r,a){var e,i,t,v,s,o,u,f,n,d,q,E,y,p,h,m,j;for(j=vI(r.shape,r.strides),u=j.sh,d=j.sx,e=tI(r.dtype),q=r.offset,i=r.data,v=d[0],t=r.accessors[1],m=u[1];m>0;)for(m0;)for(h0;)for(w0;)for(S0;)for(x0;)for(_0;)for(b0;)for(c0;)for(g0;)for(k0;)for(R0;)for(N0;)for(O0;)for(A0;)for(L0;)for(C0;)for(I0;)for(z0;)for(D0;)for(k0;)for(F0;)for(U0;)for(B0;)for(M0;)for(P0;)for(L0;)for(C0;)for(Z0;)for(J0;)for(Y0;)for(G0;)for(K0;)for(F0;)for(U0;)for(B0;)for(H0;)for($0;)for(X0;)for(Q0;)for(W0;)for(Z0;)for(J0;)for(Y0;)for(G0;)for(ar0;)for(vr0;)for(rr0;)for(ir0;)for(er0;)for(H0;)for($0;)for(X0;)for(Q0;)for(W0;)for(h0;)for(p0;)for(S0;)for(x0;)for(T0;)for(b0;)for(c0;)for(g0;)for(l0;)for(R0;)for(N0;)for(O0;)for(A0;)for(_0;)for(C0;)for(I0;)for(z0;)for(D0;)for(k0;)for(R0;)for(U0;)for(B0;)for(M