Skip to content

Commit d4cd016

Browse files
committed
feat: add float16 dtype support to ndarray/slice-to
1 parent 9eeec88 commit d4cd016

5 files changed

Lines changed: 120 additions & 1 deletion

File tree

‎lib/node_modules/@stdlib/ndarray/slice-to/benchmark/benchmark.call_signatures.js‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ bench( format( '%s::2d,base,separate_arguments', pkg ), function benchmark( b )
3838
values = [
3939
baseEmpty( 'float64', [ 2, 2 ], 'row-major' ),
4040
baseEmpty( 'float32', [ 2, 2 ], 'row-major' ),
41+
baseEmpty( 'float16', [ 2, 2 ], 'row-major' ),
4142
baseEmpty( 'int32', [ 2, 2 ], 'row-major' ),
4243
baseEmpty( 'complex128', [ 2, 2 ], 'row-major' ),
4344
baseEmpty( 'generic', [ 2, 2 ], 'row-major' )
@@ -66,6 +67,7 @@ bench( format( '%s::2d,base,array', pkg ), function benchmark( b ) {
6667
values = [
6768
baseEmpty( 'float64', [ 2, 2 ], 'row-major' ),
6869
baseEmpty( 'float32', [ 2, 2 ], 'row-major' ),
70+
baseEmpty( 'float16', [ 2, 2 ], 'row-major' ),
6971
baseEmpty( 'int32', [ 2, 2 ], 'row-major' ),
7072
baseEmpty( 'complex128', [ 2, 2 ], 'row-major' ),
7173
baseEmpty( 'generic', [ 2, 2 ], 'row-major' )

‎lib/node_modules/@stdlib/ndarray/slice-to/benchmark/benchmark.js‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ bench( format( '%s::0d,base', pkg ), function benchmark( b ) {
4040
values = [
4141
baseEmpty( 'float64', [], 'row-major' ),
4242
baseEmpty( 'float32', [], 'row-major' ),
43+
baseEmpty( 'float16', [], 'row-major' ),
4344
baseEmpty( 'int32', [], 'row-major' ),
4445
baseEmpty( 'complex128', [], 'row-major' ),
4546
baseEmpty( 'generic', [], 'row-major' )
@@ -72,6 +73,7 @@ bench( format( '%s::0d,non-base', pkg ), function benchmark( b ) {
7273
values = [
7374
empty( [], { 'dtype': 'float64' } ),
7475
empty( [], { 'dtype': 'float32' } ),
76+
empty( [], { 'dtype': 'float16' } ),
7577
empty( [], { 'dtype': 'int32' } ),
7678
empty( [], { 'dtype': 'complex128' } ),
7779
empty( [], { 'dtype': 'generic' } )
@@ -105,6 +107,7 @@ bench( format( '%s::1d,base', pkg ), function benchmark( b ) {
105107
values = [
106108
baseEmpty( 'float64', [ 2 ], 'row-major' ),
107109
baseEmpty( 'float32', [ 2 ], 'row-major' ),
110+
baseEmpty( 'float16', [ 2 ], 'row-major' ),
108111
baseEmpty( 'int32', [ 2 ], 'row-major' ),
109112
baseEmpty( 'complex128', [ 2 ], 'row-major' ),
110113
baseEmpty( 'generic', [ 2 ], 'row-major' )
@@ -137,6 +140,7 @@ bench( format( '%s::1d,non-base', pkg ), function benchmark( b ) {
137140
values = [
138141
empty( [ 2 ], { 'dtype': 'float64' } ),
139142
empty( [ 2 ], { 'dtype': 'float32' } ),
143+
empty( [ 2 ], { 'dtype': 'float16' } ),
140144
empty( [ 2 ], { 'dtype': 'int32' } ),
141145
empty( [ 2 ], { 'dtype': 'complex128' } ),
142146
empty( [ 2 ], { 'dtype': 'generic' } )
@@ -171,6 +175,7 @@ bench( format( '%s::1d,base,out-of-bounds', pkg ), function benchmark( b ) {
171175
values = [
172176
baseEmpty( 'float64', [ 2 ], 'row-major' ),
173177
baseEmpty( 'float32', [ 2 ], 'row-major' ),
178+
baseEmpty( 'float16', [ 2 ], 'row-major' ),
174179
baseEmpty( 'int32', [ 2 ], 'row-major' ),
175180
baseEmpty( 'complex128', [ 2 ], 'row-major' ),
176181
baseEmpty( 'generic', [ 2 ], 'row-major' )
@@ -207,6 +212,7 @@ bench( format( '%s::1d,non-base,out-of-bounds', pkg ), function benchmark( b ) {
207212
values = [
208213
empty( [ 2 ], { 'dtype': 'float64' } ),
209214
empty( [ 2 ], { 'dtype': 'float32' } ),
215+
empty( [ 2 ], { 'dtype': 'float16' } ),
210216
empty( [ 2 ], { 'dtype': 'int32' } ),
211217
empty( [ 2 ], { 'dtype': 'complex128' } ),
212218
empty( [ 2 ], { 'dtype': 'generic' } )
@@ -243,6 +249,7 @@ bench( format( '%s::2d,base', pkg ), function benchmark( b ) {
243249
values = [
244250
baseEmpty( 'float64', [ 2, 2 ], 'row-major' ),
245251
baseEmpty( 'float32', [ 2, 2 ], 'row-major' ),
252+
baseEmpty( 'float16', [ 2, 2 ], 'row-major' ),
246253
baseEmpty( 'int32', [ 2, 2 ], 'row-major' ),
247254
baseEmpty( 'complex128', [ 2, 2 ], 'row-major' ),
248255
baseEmpty( 'generic', [ 2, 2 ], 'row-major' )
@@ -275,6 +282,7 @@ bench( format( '%s::2d,non-base', pkg ), function benchmark( b ) {
275282
values = [
276283
empty( [ 2, 2 ], { 'dtype': 'float64' } ),
277284
empty( [ 2, 2 ], { 'dtype': 'float32' } ),
285+
empty( [ 2, 2 ], { 'dtype': 'float16' } ),
278286
empty( [ 2, 2 ], { 'dtype': 'int32' } ),
279287
empty( [ 2, 2 ], { 'dtype': 'complex128' } ),
280288
empty( [ 2, 2 ], { 'dtype': 'generic' } )
@@ -309,6 +317,7 @@ bench( format( '%s::2d,base,out-of-bounds', pkg ), function benchmark( b ) {
309317
values = [
310318
baseEmpty( 'float64', [ 2, 2 ], 'row-major' ),
311319
baseEmpty( 'float32', [ 2, 2 ], 'row-major' ),
320+
baseEmpty( 'float16', [ 2, 2 ], 'row-major' ),
312321
baseEmpty( 'int32', [ 2, 2 ], 'row-major' ),
313322
baseEmpty( 'complex128', [ 2, 2 ], 'row-major' ),
314323
baseEmpty( 'generic', [ 2, 2 ], 'row-major' )
@@ -345,6 +354,7 @@ bench( format( '%s::2d,non-base,out-of-bounds', pkg ), function benchmark( b ) {
345354
values = [
346355
empty( [ 2, 2 ], { 'dtype': 'float64' } ),
347356
empty( [ 2, 2 ], { 'dtype': 'float32' } ),
357+
empty( [ 2, 2 ], { 'dtype': 'float16' } ),
348358
empty( [ 2, 2 ], { 'dtype': 'int32' } ),
349359
empty( [ 2, 2 ], { 'dtype': 'complex128' } ),
350360
empty( [ 2, 2 ], { 'dtype': 'generic' } )
@@ -381,6 +391,7 @@ bench( format( '%s::3d,base', pkg ), function benchmark( b ) {
381391
values = [
382392
baseEmpty( 'float64', [ 2, 2, 2 ], 'row-major' ),
383393
baseEmpty( 'float32', [ 2, 2, 2 ], 'row-major' ),
394+
baseEmpty( 'float16', [ 2, 2, 2 ], 'row-major' ),
384395
baseEmpty( 'int32', [ 2, 2, 2 ], 'row-major' ),
385396
baseEmpty( 'complex128', [ 2, 2, 2 ], 'row-major' ),
386397
baseEmpty( 'generic', [ 2, 2, 2 ], 'row-major' )
@@ -413,6 +424,7 @@ bench( format( '%s::3d,non-base', pkg ), function benchmark( b ) {
413424
values = [
414425
empty( [ 2, 2, 2 ], { 'dtype': 'float64' } ),
415426
empty( [ 2, 2, 2 ], { 'dtype': 'float32' } ),
427+
empty( [ 2, 2, 2 ], { 'dtype': 'float16' } ),
416428
empty( [ 2, 2, 2 ], { 'dtype': 'int32' } ),
417429
empty( [ 2, 2, 2 ], { 'dtype': 'complex128' } ),
418430
empty( [ 2, 2, 2 ], { 'dtype': 'generic' } )
@@ -447,6 +459,7 @@ bench( format( '%s::3d,base,out-of-bounds', pkg ), function benchmark( b ) {
447459
values = [
448460
baseEmpty( 'float64', [ 2, 2, 2 ], 'row-major' ),
449461
baseEmpty( 'float32', [ 2, 2, 2 ], 'row-major' ),
462+
baseEmpty( 'float16', [ 2, 2, 2 ], 'row-major' ),
450463
baseEmpty( 'int32', [ 2, 2, 2 ], 'row-major' ),
451464
baseEmpty( 'complex128', [ 2, 2, 2 ], 'row-major' ),
452465
baseEmpty( 'generic', [ 2, 2, 2 ], 'row-major' )
@@ -483,6 +496,7 @@ bench( format( '%s::3d,non-base,out-of-bounds', pkg ), function benchmark( b ) {
483496
values = [
484497
empty( [ 2, 2, 2 ], { 'dtype': 'float64' } ),
485498
empty( [ 2, 2, 2 ], { 'dtype': 'float32' } ),
499+
empty( [ 2, 2, 2 ], { 'dtype': 'float16' } ),
486500
empty( [ 2, 2, 2 ], { 'dtype': 'int32' } ),
487501
empty( [ 2, 2, 2 ], { 'dtype': 'complex128' } ),
488502
empty( [ 2, 2, 2 ], { 'dtype': 'generic' } )
@@ -519,6 +533,7 @@ bench( format( '%s::4d,base', pkg ), function benchmark( b ) {
519533
values = [
520534
baseEmpty( 'float64', [ 2, 2, 2, 2 ], 'row-major' ),
521535
baseEmpty( 'float32', [ 2, 2, 2, 2 ], 'row-major' ),
536+
baseEmpty( 'float16', [ 2, 2, 2, 2 ], 'row-major' ),
522537
baseEmpty( 'int32', [ 2, 2, 2, 2 ], 'row-major' ),
523538
baseEmpty( 'complex128', [ 2, 2, 2, 2 ], 'row-major' ),
524539
baseEmpty( 'generic', [ 2, 2, 2, 2 ], 'row-major' )
@@ -551,6 +566,7 @@ bench( format( '%s::4d,non-base', pkg ), function benchmark( b ) {
551566
values = [
552567
empty( [ 2, 2, 2, 2 ], { 'dtype': 'float64' } ),
553568
empty( [ 2, 2, 2, 2 ], { 'dtype': 'float32' } ),
569+
empty( [ 2, 2, 2, 2 ], { 'dtype': 'float16' } ),
554570
empty( [ 2, 2, 2, 2 ], { 'dtype': 'int32' } ),
555571
empty( [ 2, 2, 2, 2 ], { 'dtype': 'complex128' } ),
556572
empty( [ 2, 2, 2, 2 ], { 'dtype': 'generic' } )
@@ -585,6 +601,7 @@ bench( format( '%s::4d,base,out-of-bounds', pkg ), function benchmark( b ) {
585601
values = [
586602
baseEmpty( 'float64', [ 2, 2, 2, 2 ], 'row-major' ),
587603
baseEmpty( 'float32', [ 2, 2, 2, 2 ], 'row-major' ),
604+
baseEmpty( 'float16', [ 2, 2, 2, 2 ], 'row-major' ),
588605
baseEmpty( 'int32', [ 2, 2, 2, 2 ], 'row-major' ),
589606
baseEmpty( 'complex128', [ 2, 2, 2, 2 ], 'row-major' ),
590607
baseEmpty( 'generic', [ 2, 2, 2, 2 ], 'row-major' )
@@ -621,6 +638,7 @@ bench( format( '%s::4d,non-base,out-of-bounds', pkg ), function benchmark( b ) {
621638
values = [
622639
empty( [ 2, 2, 2, 2 ], { 'dtype': 'float64' } ),
623640
empty( [ 2, 2, 2, 2 ], { 'dtype': 'float32' } ),
641+
empty( [ 2, 2, 2, 2 ], { 'dtype': 'float16' } ),
624642
empty( [ 2, 2, 2, 2 ], { 'dtype': 'int32' } ),
625643
empty( [ 2, 2, 2, 2 ], { 'dtype': 'complex128' } ),
626644
empty( [ 2, 2, 2, 2 ], { 'dtype': 'generic' } )
@@ -657,6 +675,7 @@ bench( format( '%s::5d,base', pkg ), function benchmark( b ) {
657675
values = [
658676
baseEmpty( 'float64', [ 2, 2, 2, 2, 2 ], 'row-major' ),
659677
baseEmpty( 'float32', [ 2, 2, 2, 2, 2 ], 'row-major' ),
678+
baseEmpty( 'float16', [ 2, 2, 2, 2, 2 ], 'row-major' ),
660679
baseEmpty( 'int32', [ 2, 2, 2, 2, 2 ], 'row-major' ),
661680
baseEmpty( 'complex128', [ 2, 2, 2, 2, 2 ], 'row-major' ),
662681
baseEmpty( 'generic', [ 2, 2, 2, 2, 2 ], 'row-major' )
@@ -689,6 +708,7 @@ bench( format( '%s::5d,non-base', pkg ), function benchmark( b ) {
689708
values = [
690709
empty( [ 2, 2, 2, 2, 2 ], { 'dtype': 'float64' } ),
691710
empty( [ 2, 2, 2, 2, 2 ], { 'dtype': 'float32' } ),
711+
empty( [ 2, 2, 2, 2, 2 ], { 'dtype': 'float16' } ),
692712
empty( [ 2, 2, 2, 2, 2 ], { 'dtype': 'int32' } ),
693713
empty( [ 2, 2, 2, 2, 2 ], { 'dtype': 'complex128' } ),
694714
empty( [ 2, 2, 2, 2, 2 ], { 'dtype': 'generic' } )
@@ -723,6 +743,7 @@ bench( format( '%s::5d,base,out-of-bounds', pkg ), function benchmark( b ) {
723743
values = [
724744
baseEmpty( 'float64', [ 2, 2, 2, 2, 2 ], 'row-major' ),
725745
baseEmpty( 'float32', [ 2, 2, 2, 2, 2 ], 'row-major' ),
746+
baseEmpty( 'float16', [ 2, 2, 2, 2, 2 ], 'row-major' ),
726747
baseEmpty( 'int32', [ 2, 2, 2, 2, 2 ], 'row-major' ),
727748
baseEmpty( 'complex128', [ 2, 2, 2, 2, 2 ], 'row-major' ),
728749
baseEmpty( 'generic', [ 2, 2, 2, 2, 2 ], 'row-major' )
@@ -759,6 +780,7 @@ bench( format( '%s::5d,non-base,out-of-bounds', pkg ), function benchmark( b ) {
759780
values = [
760781
empty( [ 2, 2, 2, 2, 2 ], { 'dtype': 'float64' } ),
761782
empty( [ 2, 2, 2, 2, 2 ], { 'dtype': 'float32' } ),
783+
empty( [ 2, 2, 2, 2, 2 ], { 'dtype': 'float16' } ),
762784
empty( [ 2, 2, 2, 2, 2 ], { 'dtype': 'int32' } ),
763785
empty( [ 2, 2, 2, 2, 2 ], { 'dtype': 'complex128' } ),
764786
empty( [ 2, 2, 2, 2, 2 ], { 'dtype': 'generic' } )

‎lib/node_modules/@stdlib/ndarray/slice-to/docs/types/index.d.ts‎

Lines changed: 80 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
/// <reference types="@stdlib/types"/>
2424

25-
import { typedndarray, genericndarray, float64ndarray, float32ndarray, int32ndarray, int16ndarray, int8ndarray, uint32ndarray, uint16ndarray, uint8ndarray, uint8cndarray, complex128ndarray, complex64ndarray } from '@stdlib/types/ndarray';
25+
import { typedndarray, genericndarray, float64ndarray, float32ndarray, float16ndarray, int32ndarray, int16ndarray, int8ndarray, uint32ndarray, uint16ndarray, uint8ndarray, uint8cndarray, complex128ndarray, complex64ndarray } from '@stdlib/types/ndarray';
2626
import { ArrayLike } from '@stdlib/types/array';
2727

2828
/**
@@ -203,6 +203,85 @@ declare function sliceTo( x: float32ndarray, stop: ArrayLike<StopArgument>, opti
203203
*/
204204
declare function sliceTo( x: float32ndarray, ...stop: Array<StopArgument | Options> ): float32ndarray;
205205

206+
/**
207+
* Returns a read-only truncated view of an input ndarray.
208+
*
209+
* @param x - input array
210+
* @param stop - ending indices (exclusive)
211+
* @param options - function options
212+
* @param options.strict - boolean indicating whether to enforce strict bounds checking
213+
* @returns output array
214+
*
215+
* @example
216+
* var typedarray = require( '@stdlib/array/typed' );
217+
* var ndarray = require( '@stdlib/ndarray/ctor' );
218+
* var ndarray2array = require( '@stdlib/ndarray/to-array' );
219+
*
220+
* var buffer = typedarray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ], 'float16' );
221+
* var shape = [ 3, 2 ];
222+
* var strides = [ 2, 1 ];
223+
* var offset = 0;
224+
*
225+
* var x = ndarray( 'float16', buffer, shape, strides, offset, 'row-major' );
226+
* // returns <ndarray>
227+
*
228+
* var sh = x.shape;
229+
* // returns [ 3, 2 ]
230+
*
231+
* var arr = ndarray2array( x );
232+
* // returns [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ]
233+
*
234+
* var s = [ 2, null ];
235+
* var y = sliceTo( x, s );
236+
* // returns <ndarray>
237+
*
238+
* sh = y.shape;
239+
* // returns [ 2, 2 ]
240+
*
241+
* arr = ndarray2array( y );
242+
* // returns [ [ 1.0, 2.0 ], [ 3.0, 4.0 ] ]
243+
*/
244+
declare function sliceTo( x: float16ndarray, stop: ArrayLike<StopArgument>, options?: Options ): float16ndarray;
245+
246+
/**
247+
* Returns a read-only truncated view of an input ndarray.
248+
*
249+
* @param x - input array
250+
* @param stop - ending indices (exclusive)
251+
* @param options - function options
252+
* @param options.strict - boolean indicating whether to enforce strict bounds checking
253+
* @returns output array
254+
*
255+
* @example
256+
* var typedarray = require( '@stdlib/array/typed' );
257+
* var ndarray = require( '@stdlib/ndarray/ctor' );
258+
* var ndarray2array = require( '@stdlib/ndarray/to-array' );
259+
*
260+
* var buffer = typedarray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ], 'float16' );
261+
* var shape = [ 3, 2 ];
262+
* var strides = [ 2, 1 ];
263+
* var offset = 0;
264+
*
265+
* var x = ndarray( 'float16', buffer, shape, strides, offset, 'row-major' );
266+
* // returns <ndarray>
267+
*
268+
* var sh = x.shape;
269+
* // returns [ 3, 2 ]
270+
*
271+
* var arr = ndarray2array( x );
272+
* // returns [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ]
273+
*
274+
* var y = sliceTo( x, 2, null );
275+
* // returns <ndarray>
276+
*
277+
* sh = y.shape;
278+
* // returns [ 2, 2 ]
279+
*
280+
* arr = ndarray2array( y );
281+
* // returns [ [ 1.0, 2.0 ], [ 3.0, 4.0 ] ]
282+
*/
283+
declare function sliceTo( x: float16ndarray, ...stop: Array<StopArgument | Options> ): float16ndarray;
284+
206285
/**
207286
* Returns a read-only truncated view of an input ndarray.
208287
*

‎lib/node_modules/@stdlib/ndarray/slice-to/docs/types/test.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import sliceTo = require( './index' );
3030

3131
sliceTo( empty( 'float64', sh, order ), s ); // $ExpectType float64ndarray
3232
sliceTo( empty( 'float32', sh, order ), s ); // $ExpectType float32ndarray
33+
sliceTo( empty( 'float16', sh, order ), s ); // $ExpectType float16ndarray
3334
sliceTo( empty( 'complex128', sh, order ), s ); // $ExpectType complex128ndarray
3435
sliceTo( empty( 'complex64', sh, order ), s ); // $ExpectType complex64ndarray
3536
sliceTo( empty( 'int32', sh, order ), s ); // $ExpectType int32ndarray
@@ -42,6 +43,7 @@ import sliceTo = require( './index' );
4243

4344
sliceTo( empty( 'float64', sh, order ), 1, null ); // $ExpectType float64ndarray
4445
sliceTo( empty( 'float32', sh, order ), 1, null ); // $ExpectType float32ndarray
46+
sliceTo( empty( 'float16', sh, order ), 1, null ); // $ExpectType float16ndarray
4547
sliceTo( empty( 'complex128', sh, order ), 1, null ); // $ExpectType complex128ndarray
4648
sliceTo( empty( 'complex64', sh, order ), 1, null ); // $ExpectType complex64ndarray
4749
sliceTo( empty( 'int32', sh, order ), 1, null ); // $ExpectType int32ndarray
@@ -54,6 +56,7 @@ import sliceTo = require( './index' );
5456

5557
sliceTo( empty( 'float64', sh, order ), s, { 'strict': false } ); // $ExpectType float64ndarray
5658
sliceTo( empty( 'float32', sh, order ), s, { 'strict': false } ); // $ExpectType float32ndarray
59+
sliceTo( empty( 'float16', sh, order ), s, { 'strict': false } ); // $ExpectType float16ndarray
5760
sliceTo( empty( 'complex128', sh, order ), s, { 'strict': false } ); // $ExpectType complex128ndarray
5861
sliceTo( empty( 'complex64', sh, order ), s, { 'strict': false } ); // $ExpectType complex64ndarray
5962
sliceTo( empty( 'int32', sh, order ), s, { 'strict': false } ); // $ExpectType int32ndarray
@@ -66,6 +69,7 @@ import sliceTo = require( './index' );
6669

6770
sliceTo( empty( 'float64', sh, order ), 1, null, { 'strict': false } ); // $ExpectType float64ndarray
6871
sliceTo( empty( 'float32', sh, order ), 1, null, { 'strict': false } ); // $ExpectType float32ndarray
72+
sliceTo( empty( 'float16', sh, order ), 1, null, { 'strict': false } ); // $ExpectType float16ndarray
6973
sliceTo( empty( 'complex128', sh, order ), 1, null, { 'strict': false } ); // $ExpectType complex128ndarray
7074
sliceTo( empty( 'complex64', sh, order ), 1, null, { 'strict': false } ); // $ExpectType complex64ndarray
7175
sliceTo( empty( 'int32', sh, order ), 1, null, { 'strict': false } ); // $ExpectType int32ndarray

‎lib/node_modules/@stdlib/ndarray/slice-to/test/test.js‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -633,17 +633,23 @@ tape( 'in non-strict mode, the function returns an empty array when an ending in
633633
var stop;
634634
var i;
635635

636+
/* eslint-disable stdlib/line-closing-bracket-spacing */
637+
636638
values = [
637639
zeros( [ 1 ], { 'dtype': 'float64' } ),
638640
zeros( [ 1, 1 ], { 'dtype': 'float32' } ),
641+
zeros( [ 1, 1 ], { 'dtype': 'float16' } ),
639642
zeros( [ 1, 1, 1 ], { 'dtype': 'int32' } ),
640643
zeros( [ 1, 1, 1, 1 ], { 'dtype': 'uint32' } ),
641644
zeros( [ 1, 1, 1, 1, 1 ], { 'dtype': 'complex128' } )
642645
];
643646

647+
/* eslint-enable stdlib/line-closing-bracket-spacing */
648+
644649
stop = [
645650
[ -10 ],
646651
[ null, -20 ],
652+
[ null, -20 ],
647653
[ -20, null, null ],
648654
[ -20, -20, null, null ],
649655
[ null, null, null, null, -10 ]
@@ -665,17 +671,23 @@ tape( 'the function returns an empty array when an ending index is the first ele
665671
var stop;
666672
var i;
667673

674+
/* eslint-disable stdlib/line-closing-bracket-spacing */
675+
668676
values = [
669677
zeros( [ 1 ], { 'dtype': 'float64' } ),
670678
zeros( [ 1, 1 ], { 'dtype': 'float32' } ),
679+
zeros( [ 1, 1 ], { 'dtype': 'float16' } ),
671680
zeros( [ 1, 1, 1 ], { 'dtype': 'int32' } ),
672681
zeros( [ 1, 1, 1, 1 ], { 'dtype': 'uint32' } ),
673682
zeros( [ 1, 1, 1, 1, 1 ], { 'dtype': 'complex128' } )
674683
];
675684

685+
/* eslint-enable stdlib/line-closing-bracket-spacing */
686+
676687
stop = [
677688
[ 0 ],
678689
[ null, 0 ],
690+
[ null, 0 ],
679691
[ 0, null, null ],
680692
[ 0, 0, null, null ],
681693
[ null, null, null, null, 0 ]

0 commit comments

Comments
 (0)