Skip to content

Commit 993ff15

Browse files
committed
test: add 6d tests & fix noncontiguous strides
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 30316d1 commit 993ff15

File tree

5 files changed

+2411
-108
lines changed

5 files changed

+2411
-108
lines changed

lib/node_modules/@stdlib/ndarray/base/includes/test/test.2d.js

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ tape( 'the function tests whether a 2-dimensional ndarray contains a specified v
187187
dt = 'float64';
188188
ord = 'row-major';
189189
sh = [ 2, 2 ];
190-
st = [ 4, 1 ];
190+
st = [ 4, 2 ];
191191
o = strides2offset( sh, st );
192192

193193
x = ndarray( dt, oneTo( 8, dt ), sh, st, o, ord );
@@ -198,7 +198,7 @@ tape( 'the function tests whether a 2-dimensional ndarray contains a specified v
198198
actual = includes( [ x, v ] );
199199
t.strictEqual( actual, false, 'returns expected value' );
200200

201-
v = scalar2ndarray( 6.0, {
201+
v = scalar2ndarray( 3.0, {
202202
'dtype': 'float64'
203203
});
204204
actual = includes( [ x, v ] );
@@ -220,7 +220,7 @@ tape( 'the function tests whether a 2-dimensional ndarray contains a specified v
220220
dt = 'float64';
221221
ord = 'row-major';
222222
sh = [ 2, 2 ];
223-
st = [ 4, -1 ];
223+
st = [ 4, -2 ];
224224
o = strides2offset( sh, st );
225225

226226
x = ndarray( dt, oneTo( 8, dt ), sh, st, o, ord );
@@ -231,7 +231,7 @@ tape( 'the function tests whether a 2-dimensional ndarray contains a specified v
231231
actual = includes( [ x, v ] );
232232
t.strictEqual( actual, false, 'returns expected value' );
233233

234-
v = scalar2ndarray( 6.0, {
234+
v = scalar2ndarray( 3.0, {
235235
'dtype': 'float64'
236236
});
237237
actual = includes( [ x, v ] );
@@ -396,7 +396,7 @@ tape( 'the function tests whether a 2-dimensional ndarray contains a specified v
396396
dt = 'complex128';
397397
ord = 'row-major';
398398
sh = [ 2, 2 ];
399-
st = [ 4, 1 ];
399+
st = [ 4, 2 ];
400400
o = strides2offset( sh, st );
401401
xbuf = oneTo( 8*2, 'float64' );
402402

@@ -408,7 +408,7 @@ tape( 'the function tests whether a 2-dimensional ndarray contains a specified v
408408
actual = includes( [ x, v ] );
409409
t.strictEqual( actual, false, 'returns expected value' );
410410

411-
v = scalar2ndarray( new Complex128( 3.0, 4.0 ), {
411+
v = scalar2ndarray( new Complex128( 1.0, 2.0 ), {
412412
'dtype': 'complex128'
413413
});
414414
actual = includes( [ x, v ] );
@@ -431,7 +431,7 @@ tape( 'the function tests whether a 2-dimensional ndarray contains a specified v
431431
dt = 'complex128';
432432
ord = 'row-major';
433433
sh = [ 2, 2 ];
434-
st = [ 4, -1 ];
434+
st = [ 4, -2 ];
435435
o = strides2offset( sh, st );
436436
xbuf = oneTo( 8*2, 'float64' );
437437

@@ -443,7 +443,7 @@ tape( 'the function tests whether a 2-dimensional ndarray contains a specified v
443443
actual = includes( [ x, v ] );
444444
t.strictEqual( actual, false, 'returns expected value' );
445445

446-
v = scalar2ndarray( new Complex128( 3.0, 4.0 ), {
446+
v = scalar2ndarray( new Complex128( 1.0, 2.0 ), {
447447
'dtype': 'complex128'
448448
});
449449
actual = includes( [ x, v ] );
@@ -607,7 +607,7 @@ tape( 'the function tests whether a 2-dimensional ndarray contains a specified v
607607
dt = 'float64';
608608
ord = 'row-major';
609609
sh = [ 2, 2 ];
610-
st = [ 4, 1 ];
610+
st = [ 4, 2 ];
611611
o = strides2offset( sh, st );
612612

613613
x = ndarray( dt, toAccessorArray( oneTo( 8, dt ) ), sh, st, o, ord );
@@ -618,7 +618,7 @@ tape( 'the function tests whether a 2-dimensional ndarray contains a specified v
618618
actual = includes( [ x, v ] );
619619
t.strictEqual( actual, false, 'returns expected value' );
620620

621-
v = scalar2ndarray( 6.0, {
621+
v = scalar2ndarray( 3.0, {
622622
'dtype': 'float64'
623623
});
624624
actual = includes( [ x, v ] );
@@ -640,7 +640,7 @@ tape( 'the function tests whether a 2-dimensional ndarray contains a specified v
640640
dt = 'float64';
641641
ord = 'row-major';
642642
sh = [ 2, 2 ];
643-
st = [ 4, -1 ];
643+
st = [ 4, -2 ];
644644
o = strides2offset( sh, st );
645645

646646
x = ndarray( dt, toAccessorArray( oneTo( 8, dt ) ), sh, st, o, ord );
@@ -651,7 +651,7 @@ tape( 'the function tests whether a 2-dimensional ndarray contains a specified v
651651
actual = includes( [ x, v ] );
652652
t.strictEqual( actual, false, 'returns expected value' );
653653

654-
v = scalar2ndarray( 6.0, {
654+
v = scalar2ndarray( 3.0, {
655655
'dtype': 'float64'
656656
});
657657
actual = includes( [ x, v ] );
@@ -877,7 +877,7 @@ tape( 'the function tests whether a 2-dimensional ndarray contains a specified v
877877
dt = 'float64';
878878
ord = 'column-major';
879879
sh = [ 2, 2 ];
880-
st = [ 1, 4 ];
880+
st = [ 2, 4 ];
881881
o = strides2offset( sh, st );
882882

883883
x = ndarray( dt, oneTo( 8, dt ), sh, st, o, ord );
@@ -888,7 +888,7 @@ tape( 'the function tests whether a 2-dimensional ndarray contains a specified v
888888
actual = includes( [ x, v ] );
889889
t.strictEqual( actual, false, 'returns expected value' );
890890

891-
v = scalar2ndarray( 6.0, {
891+
v = scalar2ndarray( 3.0, {
892892
'dtype': 'float64'
893893
});
894894
actual = includes( [ x, v ] );
@@ -910,7 +910,7 @@ tape( 'the function tests whether a 2-dimensional ndarray contains a specified v
910910
dt = 'float64';
911911
ord = 'column-major';
912912
sh = [ 2, 2 ];
913-
st = [ -1, 4 ];
913+
st = [ -2, 4 ];
914914
o = strides2offset( sh, st );
915915

916916
x = ndarray( dt, oneTo( 8, dt ), sh, st, o, ord );
@@ -921,7 +921,7 @@ tape( 'the function tests whether a 2-dimensional ndarray contains a specified v
921921
actual = includes( [ x, v ] );
922922
t.strictEqual( actual, false, 'returns expected value' );
923923

924-
v = scalar2ndarray( 6.0, {
924+
v = scalar2ndarray( 3.0, {
925925
'dtype': 'float64'
926926
});
927927
actual = includes( [ x, v ] );
@@ -1086,7 +1086,7 @@ tape( 'the function tests whether a 2-dimensional ndarray contains a specified v
10861086
dt = 'complex128';
10871087
ord = 'column-major';
10881088
sh = [ 2, 2 ];
1089-
st = [ 1, 4 ];
1089+
st = [ 2, 4 ];
10901090
o = strides2offset( sh, st );
10911091
xbuf = oneTo( 8*2, 'float64' );
10921092

@@ -1098,7 +1098,7 @@ tape( 'the function tests whether a 2-dimensional ndarray contains a specified v
10981098
actual = includes( [ x, v ] );
10991099
t.strictEqual( actual, false, 'returns expected value' );
11001100

1101-
v = scalar2ndarray( new Complex128( 3.0, 4.0 ), {
1101+
v = scalar2ndarray( new Complex128( 1.0, 2.0 ), {
11021102
'dtype': 'complex128'
11031103
});
11041104
actual = includes( [ x, v ] );
@@ -1121,7 +1121,7 @@ tape( 'the function tests whether a 2-dimensional ndarray contains a specified v
11211121
dt = 'complex128';
11221122
ord = 'column-major';
11231123
sh = [ 2, 2 ];
1124-
st = [ -1, 4 ];
1124+
st = [ -2, 4 ];
11251125
o = strides2offset( sh, st );
11261126
xbuf = oneTo( 8*2, 'float64' );
11271127

@@ -1133,7 +1133,7 @@ tape( 'the function tests whether a 2-dimensional ndarray contains a specified v
11331133
actual = includes( [ x, v ] );
11341134
t.strictEqual( actual, false, 'returns expected value' );
11351135

1136-
v = scalar2ndarray( new Complex128( 3.0, 4.0 ), {
1136+
v = scalar2ndarray( new Complex128( 1.0, 2.0 ), {
11371137
'dtype': 'complex128'
11381138
});
11391139
actual = includes( [ x, v ] );
@@ -1297,7 +1297,7 @@ tape( 'the function tests whether a 2-dimensional ndarray contains a specified v
12971297
dt = 'float64';
12981298
ord = 'column-major';
12991299
sh = [ 2, 2 ];
1300-
st = [ 1, 4 ];
1300+
st = [ 2, 4 ];
13011301
o = strides2offset( sh, st );
13021302

13031303
x = ndarray( dt, toAccessorArray( oneTo( 8, dt ) ), sh, st, o, ord );
@@ -1308,7 +1308,7 @@ tape( 'the function tests whether a 2-dimensional ndarray contains a specified v
13081308
actual = includes( [ x, v ] );
13091309
t.strictEqual( actual, false, 'returns expected value' );
13101310

1311-
v = scalar2ndarray( 6.0, {
1311+
v = scalar2ndarray( 3.0, {
13121312
'dtype': 'float64'
13131313
});
13141314
actual = includes( [ x, v ] );
@@ -1330,7 +1330,7 @@ tape( 'the function tests whether a 2-dimensional ndarray contains a specified v
13301330
dt = 'float64';
13311331
ord = 'column-major';
13321332
sh = [ 2, 2 ];
1333-
st = [ -1, 4 ];
1333+
st = [ -2, 4 ];
13341334
o = strides2offset( sh, st );
13351335

13361336
x = ndarray( dt, toAccessorArray( oneTo( 8, dt ) ), sh, st, o, ord );
@@ -1341,7 +1341,7 @@ tape( 'the function tests whether a 2-dimensional ndarray contains a specified v
13411341
actual = includes( [ x, v ] );
13421342
t.strictEqual( actual, false, 'returns expected value' );
13431343

1344-
v = scalar2ndarray( 6.0, {
1344+
v = scalar2ndarray( 3.0, {
13451345
'dtype': 'float64'
13461346
});
13471347
actual = includes( [ x, v ] );

0 commit comments

Comments
 (0)