diff --git a/lib/node_modules/@stdlib/ndarray/slice-dimension-from/benchmark/benchmark.js b/lib/node_modules/@stdlib/ndarray/slice-dimension-from/benchmark/benchmark.js
index 708b7f86480d..811aa1deb6d0 100644
--- a/lib/node_modules/@stdlib/ndarray/slice-dimension-from/benchmark/benchmark.js
+++ b/lib/node_modules/@stdlib/ndarray/slice-dimension-from/benchmark/benchmark.js
@@ -40,6 +40,7 @@ bench( format( '%s::1d,base', pkg ), function benchmark( b ) {
values = [
baseEmpty( 'float64', [ 2 ], 'row-major' ),
baseEmpty( 'float32', [ 2 ], 'row-major' ),
+ baseEmpty( 'float16', [ 2 ], 'row-major' ),
baseEmpty( 'int32', [ 2 ], 'row-major' ),
baseEmpty( 'complex128', [ 2 ], 'row-major' ),
baseEmpty( 'generic', [ 2 ], 'row-major' )
@@ -72,6 +73,7 @@ bench( format( '%s::1d,non-base', pkg ), function benchmark( b ) {
values = [
empty( [ 2 ], { 'dtype': 'float64' } ),
empty( [ 2 ], { 'dtype': 'float32' } ),
+ empty( [ 2 ], { 'dtype': 'float16' } ),
empty( [ 2 ], { 'dtype': 'int32' } ),
empty( [ 2 ], { 'dtype': 'complex128' } ),
empty( [ 2 ], { 'dtype': 'generic' } )
@@ -106,6 +108,7 @@ bench( format( '%s::1d,base,out-of-bounds', pkg ), function benchmark( b ) {
values = [
baseEmpty( 'float64', [ 2 ], 'row-major' ),
baseEmpty( 'float32', [ 2 ], 'row-major' ),
+ baseEmpty( 'float16', [ 2 ], 'row-major' ),
baseEmpty( 'int32', [ 2 ], 'row-major' ),
baseEmpty( 'complex128', [ 2 ], 'row-major' ),
baseEmpty( 'generic', [ 2 ], 'row-major' )
@@ -142,6 +145,7 @@ bench( format( '%s::1d,non-base,out-of-bounds', pkg ), function benchmark( b ) {
values = [
empty( [ 2 ], { 'dtype': 'float64' } ),
empty( [ 2 ], { 'dtype': 'float32' } ),
+ empty( [ 2 ], { 'dtype': 'float16' } ),
empty( [ 2 ], { 'dtype': 'int32' } ),
empty( [ 2 ], { 'dtype': 'complex128' } ),
empty( [ 2 ], { 'dtype': 'generic' } )
@@ -178,6 +182,7 @@ bench( format( '%s::2d,base', pkg ), function benchmark( b ) {
values = [
baseEmpty( 'float64', [ 2, 2 ], 'row-major' ),
baseEmpty( 'float32', [ 2, 2 ], 'row-major' ),
+ baseEmpty( 'float16', [ 2, 2 ], 'row-major' ),
baseEmpty( 'int32', [ 2, 2 ], 'row-major' ),
baseEmpty( 'complex128', [ 2, 2 ], 'row-major' ),
baseEmpty( 'generic', [ 2, 2 ], 'row-major' )
@@ -210,6 +215,7 @@ bench( format( '%s::2d,non-base', pkg ), function benchmark( b ) {
values = [
empty( [ 2, 2 ], { 'dtype': 'float64' } ),
empty( [ 2, 2 ], { 'dtype': 'float32' } ),
+ empty( [ 2, 2 ], { 'dtype': 'float16' } ),
empty( [ 2, 2 ], { 'dtype': 'int32' } ),
empty( [ 2, 2 ], { 'dtype': 'complex128' } ),
empty( [ 2, 2 ], { 'dtype': 'generic' } )
@@ -244,6 +250,7 @@ bench( format( '%s::2d,base,out-of-bounds', pkg ), function benchmark( b ) {
values = [
baseEmpty( 'float64', [ 2, 2 ], 'row-major' ),
baseEmpty( 'float32', [ 2, 2 ], 'row-major' ),
+ baseEmpty( 'float16', [ 2, 2 ], 'row-major' ),
baseEmpty( 'int32', [ 2, 2 ], 'row-major' ),
baseEmpty( 'complex128', [ 2, 2 ], 'row-major' ),
baseEmpty( 'generic', [ 2, 2 ], 'row-major' )
@@ -280,6 +287,7 @@ bench( format( '%s::2d,non-base,out-of-bounds', pkg ), function benchmark( b ) {
values = [
empty( [ 2, 2 ], { 'dtype': 'float64' } ),
empty( [ 2, 2 ], { 'dtype': 'float32' } ),
+ empty( [ 2, 2 ], { 'dtype': 'float16' } ),
empty( [ 2, 2 ], { 'dtype': 'int32' } ),
empty( [ 2, 2 ], { 'dtype': 'complex128' } ),
empty( [ 2, 2 ], { 'dtype': 'generic' } )
@@ -316,6 +324,7 @@ bench( format( '%s::3d,base', pkg ), function benchmark( b ) {
values = [
baseEmpty( 'float64', [ 2, 2, 2 ], 'row-major' ),
baseEmpty( 'float32', [ 2, 2, 2 ], 'row-major' ),
+ baseEmpty( 'float16', [ 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' )
@@ -348,6 +357,7 @@ bench( format( '%s::3d,non-base', pkg ), function benchmark( b ) {
values = [
empty( [ 2, 2, 2 ], { 'dtype': 'float64' } ),
empty( [ 2, 2, 2 ], { 'dtype': 'float32' } ),
+ empty( [ 2, 2, 2 ], { 'dtype': 'float16' } ),
empty( [ 2, 2, 2 ], { 'dtype': 'int32' } ),
empty( [ 2, 2, 2 ], { 'dtype': 'complex128' } ),
empty( [ 2, 2, 2 ], { 'dtype': 'generic' } )
@@ -382,6 +392,7 @@ bench( format( '%s::3d,base,out-of-bounds', pkg ), function benchmark( b ) {
values = [
baseEmpty( 'float64', [ 2, 2, 2 ], 'row-major' ),
baseEmpty( 'float32', [ 2, 2, 2 ], 'row-major' ),
+ baseEmpty( 'float16', [ 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' )
@@ -418,6 +429,7 @@ bench( format( '%s::3d,non-base,out-of-bounds', pkg ), function benchmark( b ) {
values = [
empty( [ 2, 2, 2 ], { 'dtype': 'float64' } ),
empty( [ 2, 2, 2 ], { 'dtype': 'float32' } ),
+ empty( [ 2, 2, 2 ], { 'dtype': 'float16' } ),
empty( [ 2, 2, 2 ], { 'dtype': 'int32' } ),
empty( [ 2, 2, 2 ], { 'dtype': 'complex128' } ),
empty( [ 2, 2, 2 ], { 'dtype': 'generic' } )
@@ -454,6 +466,7 @@ bench( format( '%s::4d,base', pkg ), function benchmark( b ) {
values = [
baseEmpty( 'float64', [ 2, 2, 2, 2 ], 'row-major' ),
baseEmpty( 'float32', [ 2, 2, 2, 2 ], 'row-major' ),
+ baseEmpty( 'float16', [ 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' )
@@ -486,6 +499,7 @@ bench( format( '%s::4d,non-base', pkg ), function benchmark( b ) {
values = [
empty( [ 2, 2, 2, 2 ], { 'dtype': 'float64' } ),
empty( [ 2, 2, 2, 2 ], { 'dtype': 'float32' } ),
+ empty( [ 2, 2, 2, 2 ], { 'dtype': 'float16' } ),
empty( [ 2, 2, 2, 2 ], { 'dtype': 'int32' } ),
empty( [ 2, 2, 2, 2 ], { 'dtype': 'complex128' } ),
empty( [ 2, 2, 2, 2 ], { 'dtype': 'generic' } )
@@ -520,6 +534,7 @@ bench( format( '%s::4d,base,out-of-bounds', pkg ), function benchmark( b ) {
values = [
baseEmpty( 'float64', [ 2, 2, 2, 2 ], 'row-major' ),
baseEmpty( 'float32', [ 2, 2, 2, 2 ], 'row-major' ),
+ baseEmpty( 'float16', [ 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' )
@@ -556,6 +571,7 @@ bench( format( '%s::4d,non-base,out-of-bounds', pkg ), function benchmark( b ) {
values = [
empty( [ 2, 2, 2, 2 ], { 'dtype': 'float64' } ),
empty( [ 2, 2, 2, 2 ], { 'dtype': 'float32' } ),
+ empty( [ 2, 2, 2, 2 ], { 'dtype': 'float16' } ),
empty( [ 2, 2, 2, 2 ], { 'dtype': 'int32' } ),
empty( [ 2, 2, 2, 2 ], { 'dtype': 'complex128' } ),
empty( [ 2, 2, 2, 2 ], { 'dtype': 'generic' } )
@@ -592,6 +608,7 @@ bench( format( '%s::5d,base', pkg ), function benchmark( b ) {
values = [
baseEmpty( 'float64', [ 2, 2, 2, 2, 2 ], 'row-major' ),
baseEmpty( 'float32', [ 2, 2, 2, 2, 2 ], 'row-major' ),
+ baseEmpty( 'float16', [ 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' )
@@ -624,6 +641,7 @@ bench( format( '%s::5d,non-base', pkg ), function benchmark( b ) {
values = [
empty( [ 2, 2, 2, 2, 2 ], { 'dtype': 'float64' } ),
empty( [ 2, 2, 2, 2, 2 ], { 'dtype': 'float32' } ),
+ empty( [ 2, 2, 2, 2, 2 ], { 'dtype': 'float16' } ),
empty( [ 2, 2, 2, 2, 2 ], { 'dtype': 'int32' } ),
empty( [ 2, 2, 2, 2, 2 ], { 'dtype': 'complex128' } ),
empty( [ 2, 2, 2, 2, 2 ], { 'dtype': 'generic' } )
@@ -658,6 +676,7 @@ bench( format( '%s::5d,base,out-of-bounds', pkg ), function benchmark( b ) {
values = [
baseEmpty( 'float64', [ 2, 2, 2, 2, 2 ], 'row-major' ),
baseEmpty( 'float32', [ 2, 2, 2, 2, 2 ], 'row-major' ),
+ baseEmpty( 'float16', [ 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' )
@@ -694,6 +713,7 @@ bench( format( '%s::5d,non-base,out-of-bounds', pkg ), function benchmark( b ) {
values = [
empty( [ 2, 2, 2, 2, 2 ], { 'dtype': 'float64' } ),
empty( [ 2, 2, 2, 2, 2 ], { 'dtype': 'float32' } ),
+ empty( [ 2, 2, 2, 2, 2 ], { 'dtype': 'float16' } ),
empty( [ 2, 2, 2, 2, 2 ], { 'dtype': 'int32' } ),
empty( [ 2, 2, 2, 2, 2 ], { 'dtype': 'complex128' } ),
empty( [ 2, 2, 2, 2, 2 ], { 'dtype': 'generic' } )
diff --git a/lib/node_modules/@stdlib/ndarray/slice-dimension-from/docs/types/index.d.ts b/lib/node_modules/@stdlib/ndarray/slice-dimension-from/docs/types/index.d.ts
index 6df2c530d613..92dc4d4cdfa0 100644
--- a/lib/node_modules/@stdlib/ndarray/slice-dimension-from/docs/types/index.d.ts
+++ b/lib/node_modules/@stdlib/ndarray/slice-dimension-from/docs/types/index.d.ts
@@ -20,7 +20,7 @@
///
-import { typedndarray, genericndarray, float64ndarray, float32ndarray, int32ndarray, int16ndarray, int8ndarray, uint32ndarray, uint16ndarray, uint8ndarray, uint8cndarray, complex128ndarray, complex64ndarray } from '@stdlib/types/ndarray';
+import { typedndarray, genericndarray, float64ndarray, float32ndarray, float16ndarray, int32ndarray, int16ndarray, int8ndarray, uint32ndarray, uint16ndarray, uint8ndarray, uint8cndarray, complex128ndarray, complex64ndarray } from '@stdlib/types/ndarray';
/**
* Interface defining function options.
@@ -112,6 +112,46 @@ declare function sliceDimensionFrom( x: float64ndarray, dim: number, start: numb
*/
declare function sliceDimensionFrom( x: float32ndarray, dim: number, start: number, options?: Options ): float32ndarray;
+/**
+* Returns a read-only shifted view of an input ndarray along a specified dimension.
+*
+* @param x - input array
+* @param dim - index of dimension to slice
+* @param start - starting index (inclusive)
+* @param options - function options
+* @param options.strict - boolean indicating whether to enforce strict bounds checking
+* @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 ], 'float16' );
+* var shape = [ 3, 2 ];
+* var strides = [ 2, 1 ];
+* var offset = 0;
+*
+* var x = ndarray( 'float16', 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 = sliceDimensionFrom( x, 0, 1 );
+* // returns
+*
+* sh = y.shape;
+* // returns [ 2, 2 ]
+*
+* arr = ndarray2array( y );
+* // returns [ [ 3.0, 4.0 ], [ 5.0, 6.0 ] ]
+*/
+declare function sliceDimensionFrom( x: float16ndarray, dim: number, start: number, options?: Options ): float16ndarray;
+
/**
* Returns a read-only shifted view of an input ndarray along a specified dimension.
*
diff --git a/lib/node_modules/@stdlib/ndarray/slice-dimension-from/docs/types/test.ts b/lib/node_modules/@stdlib/ndarray/slice-dimension-from/docs/types/test.ts
index 9693bb399e69..d269183c720e 100644
--- a/lib/node_modules/@stdlib/ndarray/slice-dimension-from/docs/types/test.ts
+++ b/lib/node_modules/@stdlib/ndarray/slice-dimension-from/docs/types/test.ts
@@ -30,6 +30,7 @@ import sliceDimensionFrom = require( './index' );
sliceDimensionFrom( empty( 'float64', sh, order ), 1, s ); // $ExpectType float64ndarray
sliceDimensionFrom( empty( 'float32', sh, order ), 1, s ); // $ExpectType float32ndarray
+ sliceDimensionFrom( empty( 'float16', sh, order ), 1, s ); // $ExpectType float16ndarray
sliceDimensionFrom( empty( 'complex128', sh, order ), 1, s ); // $ExpectType complex128ndarray
sliceDimensionFrom( empty( 'complex64', sh, order ), 1, s ); // $ExpectType complex64ndarray
sliceDimensionFrom( empty( 'int32', sh, order ), 1, s ); // $ExpectType int32ndarray
@@ -42,6 +43,7 @@ import sliceDimensionFrom = require( './index' );
sliceDimensionFrom( empty( 'float64', sh, order ), 1, s, { 'strict': false } ); // $ExpectType float64ndarray
sliceDimensionFrom( empty( 'float32', sh, order ), 1, s, { 'strict': false } ); // $ExpectType float32ndarray
+ sliceDimensionFrom( empty( 'float16', sh, order ), 1, s, { 'strict': false } ); // $ExpectType float16ndarray
sliceDimensionFrom( empty( 'complex128', sh, order ), 1, s, { 'strict': false } ); // $ExpectType complex128ndarray
sliceDimensionFrom( empty( 'complex64', sh, order ), 1, s, { 'strict': false } ); // $ExpectType complex64ndarray
sliceDimensionFrom( empty( 'int32', sh, order ), 1, s, { 'strict': false } ); // $ExpectType int32ndarray
@@ -54,6 +56,7 @@ import sliceDimensionFrom = require( './index' );
sliceDimensionFrom( empty( 'float64', sh, order ), 1, s, { 'strict': true } ); // $ExpectType float64ndarray
sliceDimensionFrom( empty( 'float32', sh, order ), 1, s, { 'strict': true } ); // $ExpectType float32ndarray
+ sliceDimensionFrom( empty( 'float16', sh, order ), 1, s, { 'strict': true } ); // $ExpectType float16ndarray
sliceDimensionFrom( empty( 'complex128', sh, order ), 1, s, { 'strict': true } ); // $ExpectType complex128ndarray
sliceDimensionFrom( empty( 'complex64', sh, order ), 1, s, { 'strict': true } ); // $ExpectType complex64ndarray
sliceDimensionFrom( empty( 'int32', sh, order ), 1, s, { 'strict': true } ); // $ExpectType int32ndarray
@@ -126,13 +129,13 @@ import sliceDimensionFrom = require( './index' );
sliceDimensionFrom( x, 1, ( x: number ): number => x, 1 ); // $ExpectError
sliceDimensionFrom( x, 1, '5', {} ); // $ExpectError
- sliceDimensionFrom( x, 1, false, {}; // $ExpectError
- sliceDimensionFrom( x, 1, true, {}; // $ExpectError
- sliceDimensionFrom( x, 1, null, {}; // $ExpectError
- sliceDimensionFrom( x, 1, undefined, {}; // $ExpectError
- sliceDimensionFrom( x, 1, [ '5' ], {}; // $ExpectError
- sliceDimensionFrom( x, 1, {}, {}; // $ExpectError
- sliceDimensionFrom( x, 1, ( x: number ): number => x, {}; // $ExpectError
+ sliceDimensionFrom( x, 1, false, {} ); // $ExpectError
+ sliceDimensionFrom( x, 1, true, {} ); // $ExpectError
+ sliceDimensionFrom( x, 1, null, {} ); // $ExpectError
+ sliceDimensionFrom( x, 1, undefined, {} ); // $ExpectError
+ sliceDimensionFrom( x, 1, [ '5' ], {} ); // $ExpectError
+ sliceDimensionFrom( x, 1, {}, {} ); // $ExpectError
+ sliceDimensionFrom( x, 1, ( x: number ): number => x, {} ); // $ExpectError
}
// The compiler throws an error if the function is provided a fourth argument which is not an object...
diff --git a/lib/node_modules/@stdlib/ndarray/slice-dimension-from/test/test.js b/lib/node_modules/@stdlib/ndarray/slice-dimension-from/test/test.js
index ef0513ac6130..b977e509a761 100644
--- a/lib/node_modules/@stdlib/ndarray/slice-dimension-from/test/test.js
+++ b/lib/node_modules/@stdlib/ndarray/slice-dimension-from/test/test.js
@@ -493,6 +493,7 @@ tape( 'in non-strict mode, the function returns an empty array when a starting i
values = [
zeros( [ 1 ], { 'dtype': 'float64' } ),
zeros( [ 1, 1 ], { 'dtype': 'float32' } ),
+ zeros( [ 1, 1 ], { 'dtype': 'float16' } ),
zeros( [ 1, 1, 1 ], { 'dtype': 'int32' } ),
zeros( [ 1, 1, 1, 1 ], { 'dtype': 'uint32' } ),
zeros( [ 1, 1, 1, 1, 1 ], { 'dtype': 'complex128' } )
@@ -505,6 +506,7 @@ tape( 'in non-strict mode, the function returns an empty array when a starting i
20,
20,
20,
+ 20,
10
];
for ( i = 0; i < values.length; i++ ) {
@@ -530,6 +532,7 @@ tape( 'in non-strict mode, the function returns an empty array when a starting i
values = [
zeros( [ 1 ], { 'dtype': 'float64' } ),
zeros( [ 1, 1 ], { 'dtype': 'float32' } ),
+ zeros( [ 1, 1 ], { 'dtype': 'float16' } ),
zeros( [ 1, 1, 1 ], { 'dtype': 'int32' } ),
zeros( [ 1, 1, 1, 1 ], { 'dtype': 'uint32' } ),
zeros( [ 1, 1, 1, 1, 1 ], { 'dtype': 'complex128' } )
@@ -540,6 +543,7 @@ tape( 'in non-strict mode, the function returns an empty array when a starting i
dim = [
0,
1,
+ 1,
0,
1,
4
@@ -550,6 +554,7 @@ tape( 'in non-strict mode, the function returns an empty array when a starting i
1,
1,
1,
+ 1,
1
];
for ( i = 0; i < values.length; i++ ) {