@@ -1127,19 +1127,19 @@ tape( 'the function supports specifying operation dimensions (row-major)', funct
1127
1127
t . end ( ) ;
1128
1128
} ) ;
1129
1129
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 ) {
1131
1131
var expected ;
1132
1132
var actual ;
1133
1133
var xbuf ;
1134
1134
var x ;
1135
1135
1136
1136
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' ) ;
1138
1138
1139
1139
actual = indexOf ( x , 2.0 , {
1140
1140
'dims' : [ 0 ]
1141
1141
} ) ;
1142
- expected = [ - 1 , 0 ] ;
1142
+ expected = [ 1 , - 1 ] ;
1143
1143
1144
1144
t . strictEqual ( isndarrayLike ( actual ) , true , 'returns expected value' ) ;
1145
1145
t . strictEqual ( getDType ( actual ) , 'generic' , 'returns expected value' ) ;
@@ -1150,7 +1150,7 @@ tape( 'the function supports specifying operation dimensions (row-major)', funct
1150
1150
actual = indexOf ( x , 2.0 , 0 , {
1151
1151
'dims' : [ 0 ]
1152
1152
} ) ;
1153
- expected = [ - 1 , 0 ] ;
1153
+ expected = [ 1 , - 1 ] ;
1154
1154
1155
1155
t . strictEqual ( isndarrayLike ( actual ) , true , 'returns expected value' ) ;
1156
1156
t . strictEqual ( getDType ( actual ) , 'generic' , 'returns expected value' ) ;
@@ -1159,12 +1159,12 @@ tape( 'the function supports specifying operation dimensions (row-major)', funct
1159
1159
t . deepEqual ( ndarray2array ( actual ) , expected , 'returns expected value' ) ;
1160
1160
1161
1161
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' ) ;
1163
1163
1164
1164
actual = indexOf ( x , 2.0 , {
1165
1165
'dims' : [ 1 ]
1166
1166
} ) ;
1167
- expected = [ 1 , - 1 ] ;
1167
+ expected = [ - 1 , 0 ] ;
1168
1168
1169
1169
t . strictEqual ( isndarrayLike ( actual ) , true , 'returns expected value' ) ;
1170
1170
t . strictEqual ( getDType ( actual ) , 'generic' , 'returns expected value' ) ;
@@ -1175,7 +1175,7 @@ tape( 'the function supports specifying operation dimensions (row-major)', funct
1175
1175
actual = indexOf ( x , 2.0 , 0 , {
1176
1176
'dims' : [ 1 ]
1177
1177
} ) ;
1178
- expected = [ 1 , - 1 ] ;
1178
+ expected = [ - 1 , 0 ] ;
1179
1179
1180
1180
t . strictEqual ( isndarrayLike ( actual ) , true , 'returns expected value' ) ;
1181
1181
t . strictEqual ( getDType ( actual ) , 'generic' , 'returns expected value' ) ;
@@ -1242,7 +1242,7 @@ tape( 'the function supports providing a from index (scalar)', function test( t
1242
1242
t . strictEqual ( isSameArray ( getData ( actual ) , expected ) , true , 'returns expected value' ) ;
1243
1243
1244
1244
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' ) ;
1246
1246
1247
1247
actual = indexOf ( x , 2.0 , 0 ) ;
1248
1248
expected = [ 1 ] ;
@@ -1275,7 +1275,7 @@ tape( 'the function supports providing a from index (scalar, options)', function
1275
1275
t . strictEqual ( isSameArray ( getData ( actual ) , expected ) , true , 'returns expected value' ) ;
1276
1276
1277
1277
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' ) ;
1279
1279
1280
1280
actual = indexOf ( x , 2.0 , 0 , { } ) ;
1281
1281
expected = [ 1 ] ;
@@ -1312,7 +1312,7 @@ tape( 'the function supports providing a from index (0d ndarray)', function test
1312
1312
t . strictEqual ( isSameArray ( getData ( actual ) , expected ) , true , 'returns expected value' ) ;
1313
1313
1314
1314
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' ) ;
1316
1316
1317
1317
actual = indexOf ( x , 2.0 , fromIdx ) ;
1318
1318
expected = [ 1 ] ;
@@ -1349,7 +1349,7 @@ tape( 'the function supports providing a from index (0d ndarray, options)', func
1349
1349
t . strictEqual ( isSameArray ( getData ( actual ) , expected ) , true , 'returns expected value' ) ;
1350
1350
1351
1351
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' ) ;
1353
1353
1354
1354
actual = indexOf ( x , 2.0 , fromIdx , { } ) ;
1355
1355
expected = [ 1 ] ;
0 commit comments