Skip to content

Commit 798e5df

Browse files
committed
fix: incorrect strides in test cases
--- 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 0396f52 commit 798e5df

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

lib/node_modules/@stdlib/blas/ext/index-of/test/test.main.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1127,19 +1127,19 @@ tape( 'the function supports specifying operation dimensions (row-major)', funct
11271127
t.end();
11281128
});
11291129

1130-
tape( 'the function supports specifying operation dimensions (row-major)', function test( t ) {
1130+
tape( 'the function supports specifying operation dimensions (column-major)', function test( t ) {
11311131
var expected;
11321132
var actual;
11331133
var xbuf;
11341134
var x;
11351135

11361136
xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
1137-
x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'column-major' );
1137+
x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 1, 2 ], 0, 'column-major' );
11381138

11391139
actual = indexOf( x, 2.0, {
11401140
'dims': [ 0 ]
11411141
});
1142-
expected = [ -1, 0 ];
1142+
expected = [ 1, -1 ];
11431143

11441144
t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' );
11451145
t.strictEqual( getDType( actual ), 'generic', 'returns expected value' );
@@ -1150,7 +1150,7 @@ tape( 'the function supports specifying operation dimensions (row-major)', funct
11501150
actual = indexOf( x, 2.0, 0, {
11511151
'dims': [ 0 ]
11521152
});
1153-
expected = [ -1, 0 ];
1153+
expected = [ 1, -1 ];
11541154

11551155
t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' );
11561156
t.strictEqual( getDType( actual ), 'generic', 'returns expected value' );
@@ -1159,12 +1159,12 @@ tape( 'the function supports specifying operation dimensions (row-major)', funct
11591159
t.deepEqual( ndarray2array( actual ), expected, 'returns expected value' );
11601160

11611161
xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
1162-
x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
1162+
x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 1, 2 ], 0, 'column-major' );
11631163

11641164
actual = indexOf( x, 2.0, {
11651165
'dims': [ 1 ]
11661166
});
1167-
expected = [ 1, -1 ];
1167+
expected = [ -1, 0 ];
11681168

11691169
t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' );
11701170
t.strictEqual( getDType( actual ), 'generic', 'returns expected value' );
@@ -1175,7 +1175,7 @@ tape( 'the function supports specifying operation dimensions (row-major)', funct
11751175
actual = indexOf( x, 2.0, 0, {
11761176
'dims': [ 1 ]
11771177
});
1178-
expected = [ 1, -1 ];
1178+
expected = [ -1, 0 ];
11791179

11801180
t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' );
11811181
t.strictEqual( getDType( actual ), 'generic', 'returns expected value' );
@@ -1242,7 +1242,7 @@ tape( 'the function supports providing a from index (scalar)', function test( t
12421242
t.strictEqual( isSameArray( getData( actual ), expected ), true, 'returns expected value' );
12431243

12441244
xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
1245-
x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'column-major' );
1245+
x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 1, 2 ], 0, 'column-major' );
12461246

12471247
actual = indexOf( x, 2.0, 0 );
12481248
expected = [ 1 ];
@@ -1275,7 +1275,7 @@ tape( 'the function supports providing a from index (scalar, options)', function
12751275
t.strictEqual( isSameArray( getData( actual ), expected ), true, 'returns expected value' );
12761276

12771277
xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
1278-
x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'column-major' );
1278+
x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 1, 2 ], 0, 'column-major' );
12791279

12801280
actual = indexOf( x, 2.0, 0, {} );
12811281
expected = [ 1 ];
@@ -1312,7 +1312,7 @@ tape( 'the function supports providing a from index (0d ndarray)', function test
13121312
t.strictEqual( isSameArray( getData( actual ), expected ), true, 'returns expected value' );
13131313

13141314
xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
1315-
x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'column-major' );
1315+
x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 1, 2 ], 0, 'column-major' );
13161316

13171317
actual = indexOf( x, 2.0, fromIdx );
13181318
expected = [ 1 ];
@@ -1349,7 +1349,7 @@ tape( 'the function supports providing a from index (0d ndarray, options)', func
13491349
t.strictEqual( isSameArray( getData( actual ), expected ), true, 'returns expected value' );
13501350

13511351
xbuf = [ -1.0, 2.0, -3.0, 4.0 ];
1352-
x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 2, 1 ], 0, 'column-major' );
1352+
x = new ndarray( 'generic', xbuf, [ 2, 2 ], [ 1, 2 ], 0, 'column-major' );
13531353

13541354
actual = indexOf( x, 2.0, fromIdx, {} );
13551355
expected = [ 1 ];

0 commit comments

Comments
 (0)