@@ -819,7 +819,7 @@ tape( 'the function returns the last index of a specified search element in an n
819
819
x = new ndarray ( 'generic' , xbuf , [ 2 , 2 ] , [ 2 , 1 ] , 0 , 'row-major' ) ;
820
820
821
821
actual = lastIndexOf ( x , 2.0 ) ;
822
- expected = [ 1 , 1 ] ;
822
+ expected = [ - 1 , - 1 ] ;
823
823
824
824
t . strictEqual ( isndarrayLike ( actual ) , true , 'returns expected value' ) ;
825
825
t . strictEqual ( getDType ( actual ) , 'generic' , 'returns expected value' ) ;
@@ -828,7 +828,7 @@ tape( 'the function returns the last index of a specified search element in an n
828
828
t . deepEqual ( ndarray2array ( actual ) , expected , 'returns expected value' ) ;
829
829
830
830
actual = lastIndexOf ( x , 2.0 , 0 ) ;
831
- expected = [ 1 , 1 ] ;
831
+ expected = [ - 1 , - 1 ] ;
832
832
833
833
t . strictEqual ( isndarrayLike ( actual ) , true , 'returns expected value' ) ;
834
834
t . strictEqual ( getDType ( actual ) , 'generic' , 'returns expected value' ) ;
@@ -849,7 +849,7 @@ tape( 'the function returns the last index of a specified search element in an n
849
849
x = new ndarray ( 'generic' , xbuf , [ 2 , 2 ] , [ 1 , 2 ] , 0 , 'column-major' ) ;
850
850
851
851
actual = lastIndexOf ( x , 2.0 ) ;
852
- expected = [ - 1 , 1 ] ;
852
+ expected = [ - 1 , 0 ] ;
853
853
854
854
t . strictEqual ( isndarrayLike ( actual ) , true , 'returns expected value' ) ;
855
855
t . strictEqual ( getDType ( actual ) , 'generic' , 'returns expected value' ) ;
@@ -858,7 +858,7 @@ tape( 'the function returns the last index of a specified search element in an n
858
858
t . deepEqual ( ndarray2array ( actual ) , expected , 'returns expected value' ) ;
859
859
860
860
actual = lastIndexOf ( x , 2.0 , 0 ) ;
861
- expected = [ - 1 , 1 ] ;
861
+ expected = [ - 1 , 0 ] ;
862
862
863
863
t . strictEqual ( isndarrayLike ( actual ) , true , 'returns expected value' ) ;
864
864
t . strictEqual ( getDType ( actual ) , 'generic' , 'returns expected value' ) ;
@@ -881,7 +881,7 @@ tape( 'the function supports specifying the operation dimension (row-major)', fu
881
881
actual = lastIndexOf ( x , 2.0 , {
882
882
'dim' : 0
883
883
} ) ;
884
- expected = [ - 1 , 1 ] ;
884
+ expected = [ - 1 , 0 ] ;
885
885
886
886
t . strictEqual ( isndarrayLike ( actual ) , true , 'returns expected value' ) ;
887
887
t . strictEqual ( getDType ( actual ) , 'generic' , 'returns expected value' ) ;
@@ -892,7 +892,7 @@ tape( 'the function supports specifying the operation dimension (row-major)', fu
892
892
actual = lastIndexOf ( x , 2.0 , 0 , {
893
893
'dim' : 0
894
894
} ) ;
895
- expected = [ - 1 , 1 ] ;
895
+ expected = [ - 1 , 0 ] ;
896
896
897
897
t . strictEqual ( isndarrayLike ( actual ) , true , 'returns expected value' ) ;
898
898
t . strictEqual ( getDType ( actual ) , 'generic' , 'returns expected value' ) ;
@@ -906,7 +906,7 @@ tape( 'the function supports specifying the operation dimension (row-major)', fu
906
906
actual = lastIndexOf ( x , 2.0 , {
907
907
'dim' : 1
908
908
} ) ;
909
- expected = [ 1 , 1 ] ;
909
+ expected = [ - 1 , - 1 ] ;
910
910
911
911
t . strictEqual ( isndarrayLike ( actual ) , true , 'returns expected value' ) ;
912
912
t . strictEqual ( getDType ( actual ) , 'generic' , 'returns expected value' ) ;
@@ -917,7 +917,7 @@ tape( 'the function supports specifying the operation dimension (row-major)', fu
917
917
actual = lastIndexOf ( x , 2.0 , 0 , {
918
918
'dim' : 1
919
919
} ) ;
920
- expected = [ 1 , 1 ] ;
920
+ expected = [ - 1 , - 1 ] ;
921
921
922
922
t . strictEqual ( isndarrayLike ( actual ) , true , 'returns expected value' ) ;
923
923
t . strictEqual ( getDType ( actual ) , 'generic' , 'returns expected value' ) ;
@@ -940,7 +940,7 @@ tape( 'the function supports specifying the operation dimension (column-major)',
940
940
actual = lastIndexOf ( x , 2.0 , {
941
941
'dim' : 0
942
942
} ) ;
943
- expected = [ 1 , 1 ] ;
943
+ expected = [ - 1 , - 1 ] ;
944
944
945
945
t . strictEqual ( isndarrayLike ( actual ) , true , 'returns expected value' ) ;
946
946
t . strictEqual ( getDType ( actual ) , 'generic' , 'returns expected value' ) ;
@@ -951,7 +951,7 @@ tape( 'the function supports specifying the operation dimension (column-major)',
951
951
actual = lastIndexOf ( x , 2.0 , 0 , {
952
952
'dim' : 0
953
953
} ) ;
954
- expected = [ 1 , 1 ] ;
954
+ expected = [ - 1 , - 1 ] ;
955
955
956
956
t . strictEqual ( isndarrayLike ( actual ) , true , 'returns expected value' ) ;
957
957
t . strictEqual ( getDType ( actual ) , 'generic' , 'returns expected value' ) ;
@@ -965,7 +965,7 @@ tape( 'the function supports specifying the operation dimension (column-major)',
965
965
actual = lastIndexOf ( x , 2.0 , {
966
966
'dim' : 1
967
967
} ) ;
968
- expected = [ - 1 , 1 ] ;
968
+ expected = [ - 1 , 0 ] ;
969
969
970
970
t . strictEqual ( isndarrayLike ( actual ) , true , 'returns expected value' ) ;
971
971
t . strictEqual ( getDType ( actual ) , 'generic' , 'returns expected value' ) ;
@@ -976,7 +976,7 @@ tape( 'the function supports specifying the operation dimension (column-major)',
976
976
actual = lastIndexOf ( x , 2.0 , 0 , {
977
977
'dim' : 1
978
978
} ) ;
979
- expected = [ - 1 , 1 ] ;
979
+ expected = [ - 1 , 0 ] ;
980
980
981
981
t . strictEqual ( isndarrayLike ( actual ) , true , 'returns expected value' ) ;
982
982
t . strictEqual ( getDType ( actual ) , 'generic' , 'returns expected value' ) ;
@@ -999,7 +999,7 @@ tape( 'the function supports specifying the output array data type', function te
999
999
actual = lastIndexOf ( x , 2.0 , {
1000
1000
'dtype' : 'int32'
1001
1001
} ) ;
1002
- expected = [ 1 , 1 ] ;
1002
+ expected = [ - 1 , - 1 ] ;
1003
1003
1004
1004
t . strictEqual ( isndarrayLike ( actual ) , true , 'returns expected value' ) ;
1005
1005
t . strictEqual ( getDType ( actual ) , 'int32' , 'returns expected value' ) ;
@@ -1013,7 +1013,7 @@ tape( 'the function supports specifying the output array data type', function te
1013
1013
actual = lastIndexOf ( x , 2.0 , 0 , {
1014
1014
'dtype' : 'int32'
1015
1015
} ) ;
1016
- expected = [ - 1 , 1 ] ;
1016
+ expected = [ - 1 , 0 ] ;
1017
1017
1018
1018
t . strictEqual ( isndarrayLike ( actual ) , true , 'returns expected value' ) ;
1019
1019
t . strictEqual ( getDType ( actual ) , 'int32' , 'returns expected value' ) ;
@@ -1040,7 +1040,7 @@ tape( 'the function supports providing a from index (scalar)', function test( t
1040
1040
x = new ndarray ( 'generic' , xbuf , [ 2 , 5 ] , [ 5 , 1 ] , 0 , 'row-major' ) ;
1041
1041
1042
1042
actual = lastIndexOf ( x , 2.0 , 2 ) ;
1043
- expected = [ 3 , 4 ] ;
1043
+ expected = [ 1 , 2 ] ;
1044
1044
1045
1045
t . strictEqual ( isndarrayLike ( actual ) , true , 'returns expected value' ) ;
1046
1046
t . strictEqual ( getDType ( actual ) , 'generic' , 'returns expected value' ) ;
@@ -1058,7 +1058,7 @@ tape( 'the function supports providing a from index (scalar)', function test( t
1058
1058
x = new ndarray ( 'generic' , xbuf , [ 2 , 5 ] , [ 1 , 2 ] , 0 , 'column-major' ) ;
1059
1059
1060
1060
actual = lastIndexOf ( x , 2.0 , 2 ) ;
1061
- expected = [ - 1 , 4 ] ;
1061
+ expected = [ - 1 , 1 ] ;
1062
1062
1063
1063
t . strictEqual ( isndarrayLike ( actual ) , true , 'returns expected value' ) ;
1064
1064
t . strictEqual ( getDType ( actual ) , 'generic' , 'returns expected value' ) ;
@@ -1085,7 +1085,7 @@ tape( 'the function supports providing a from index (scalar, options)', function
1085
1085
x = new ndarray ( 'generic' , xbuf , [ 2 , 5 ] , [ 5 , 1 ] , 0 , 'row-major' ) ;
1086
1086
1087
1087
actual = lastIndexOf ( x , 2.0 , 2 , { } ) ;
1088
- expected = [ 3 , 4 ] ;
1088
+ expected = [ 1 , 2 ] ;
1089
1089
1090
1090
t . strictEqual ( isndarrayLike ( actual ) , true , 'returns expected value' ) ;
1091
1091
t . strictEqual ( getDType ( actual ) , 'generic' , 'returns expected value' ) ;
@@ -1103,7 +1103,7 @@ tape( 'the function supports providing a from index (scalar, options)', function
1103
1103
x = new ndarray ( 'generic' , xbuf , [ 2 , 5 ] , [ 1 , 2 ] , 0 , 'column-major' ) ;
1104
1104
1105
1105
actual = lastIndexOf ( x , 2.0 , 2 , { } ) ;
1106
- expected = [ - 1 , 4 ] ;
1106
+ expected = [ - 1 , 1 ] ;
1107
1107
1108
1108
t . strictEqual ( isndarrayLike ( actual ) , true , 'returns expected value' ) ;
1109
1109
t . strictEqual ( getDType ( actual ) , 'generic' , 'returns expected value' ) ;
@@ -1134,7 +1134,7 @@ tape( 'the function supports providing a from index (0d ndarray)', function test
1134
1134
'dtype' : 'generic'
1135
1135
} ) ;
1136
1136
actual = lastIndexOf ( x , 2.0 , fromIdx ) ;
1137
- expected = [ 3 , 4 ] ;
1137
+ expected = [ 1 , 2 ] ;
1138
1138
1139
1139
t . strictEqual ( isndarrayLike ( actual ) , true , 'returns expected value' ) ;
1140
1140
t . strictEqual ( getDType ( actual ) , 'generic' , 'returns expected value' ) ;
@@ -1152,7 +1152,7 @@ tape( 'the function supports providing a from index (0d ndarray)', function test
1152
1152
x = new ndarray ( 'generic' , xbuf , [ 2 , 5 ] , [ 1 , 2 ] , 0 , 'column-major' ) ;
1153
1153
1154
1154
actual = lastIndexOf ( x , 2.0 , fromIdx ) ;
1155
- expected = [ - 1 , 4 ] ;
1155
+ expected = [ - 1 , 1 ] ;
1156
1156
1157
1157
t . strictEqual ( isndarrayLike ( actual ) , true , 'returns expected value' ) ;
1158
1158
t . strictEqual ( getDType ( actual ) , 'generic' , 'returns expected value' ) ;
@@ -1183,7 +1183,7 @@ tape( 'the function supports providing a from index (0d ndarray, options)', func
1183
1183
'dtype' : 'generic'
1184
1184
} ) ;
1185
1185
actual = lastIndexOf ( x , 2.0 , fromIdx , { } ) ;
1186
- expected = [ 3 , 4 ] ;
1186
+ expected = [ 1 , 2 ] ;
1187
1187
1188
1188
t . strictEqual ( isndarrayLike ( actual ) , true , 'returns expected value' ) ;
1189
1189
t . strictEqual ( getDType ( actual ) , 'generic' , 'returns expected value' ) ;
@@ -1201,7 +1201,7 @@ tape( 'the function supports providing a from index (0d ndarray, options)', func
1201
1201
x = new ndarray ( 'generic' , xbuf , [ 2 , 5 ] , [ 1 , 2 ] , 0 , 'column-major' ) ;
1202
1202
1203
1203
actual = lastIndexOf ( x , 2.0 , fromIdx , { } ) ;
1204
- expected = [ - 1 , 4 ] ;
1204
+ expected = [ - 1 , 1 ] ;
1205
1205
1206
1206
t . strictEqual ( isndarrayLike ( actual ) , true , 'returns expected value' ) ;
1207
1207
t . strictEqual ( getDType ( actual ) , 'generic' , 'returns expected value' ) ;
@@ -1233,7 +1233,7 @@ tape( 'the function supports providing a from index (scalar, broadcasted)', func
1233
1233
actual = lastIndexOf ( x , 2.0 , 2 , {
1234
1234
'dim' : 0
1235
1235
} ) ;
1236
- expected = [ - 1 , 4 ] ;
1236
+ expected = [ - 1 , 1 ] ;
1237
1237
1238
1238
t . strictEqual ( isndarrayLike ( actual ) , true , 'returns expected value' ) ;
1239
1239
t . strictEqual ( getDType ( actual ) , 'generic' , 'returns expected value' ) ;
@@ -1256,7 +1256,7 @@ tape( 'the function supports providing a from index (scalar, broadcasted)', func
1256
1256
actual = lastIndexOf ( x , 2.0 , 2 , {
1257
1257
'dim' : 0
1258
1258
} ) ;
1259
- expected = [ 3 , 4 ] ;
1259
+ expected = [ 1 , 2 ] ;
1260
1260
1261
1261
t . strictEqual ( isndarrayLike ( actual ) , true , 'returns expected value' ) ;
1262
1262
t . strictEqual ( getDType ( actual ) , 'generic' , 'returns expected value' ) ;
@@ -1292,7 +1292,7 @@ tape( 'the function supports providing a from index (0d ndarray, broadcasted)',
1292
1292
actual = lastIndexOf ( x , 2.0 , fromIdx , {
1293
1293
'dim' : 0
1294
1294
} ) ;
1295
- expected = [ - 1 , 4 ] ;
1295
+ expected = [ - 1 , 1 ] ;
1296
1296
1297
1297
t . strictEqual ( isndarrayLike ( actual ) , true , 'returns expected value' ) ;
1298
1298
t . strictEqual ( getDType ( actual ) , 'generic' , 'returns expected value' ) ;
@@ -1315,7 +1315,7 @@ tape( 'the function supports providing a from index (0d ndarray, broadcasted)',
1315
1315
actual = lastIndexOf ( x , 2.0 , fromIdx , {
1316
1316
'dim' : 0
1317
1317
} ) ;
1318
- expected = [ 3 , 4 ] ;
1318
+ expected = [ 1 , 2 ] ;
1319
1319
1320
1320
t . strictEqual ( isndarrayLike ( actual ) , true , 'returns expected value' ) ;
1321
1321
t . strictEqual ( getDType ( actual ) , 'generic' , 'returns expected value' ) ;
0 commit comments