You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/node_modules/@stdlib/blas/ext/last-index-of/README.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ var out = lastIndexOf( x, 2.0 );
46
46
// returns <ndarray>
47
47
48
48
var idx =out.get();
49
-
// returns 3
49
+
// returns -1
50
50
```
51
51
52
52
The function has the following parameters:
@@ -89,11 +89,11 @@ var x = array( [ 1.0, 2.0, 3.0, 4.0, 2.0, 6.0 ] );
89
89
// returns <ndarray>
90
90
91
91
// Perform operation:
92
-
var out =lastIndexOf( x, 1.0, 3 );
92
+
var out =lastIndexOf( x, 2.0, 5 );
93
93
// returns <ndarray>
94
94
95
95
var idx =out.get();
96
-
// returns -1
96
+
// returns 4
97
97
```
98
98
99
99
By default, the function performs the operation over elements in the last dimension. To perform the operation over a different dimension, provide a `dim` option.
@@ -110,7 +110,7 @@ var out = lastIndexOf( x, -3.0, {
110
110
// returns <ndarray>
111
111
112
112
var idx =ndarray2array( out );
113
-
// returns [ 1, -1 ]
113
+
// returns [ 0, -1 ]
114
114
```
115
115
116
116
By default, the function excludes reduced dimensions from the output [ndarray][@stdlib/ndarray/ctor]. To include the reduced dimensions as singleton dimensions, set the `keepdims` option to `true`.
@@ -130,7 +130,7 @@ var out = lastIndexOf( x, -3.0, opts );
130
130
// returns <ndarray>
131
131
132
132
var idx =ndarray2array( out );
133
-
// returns [ [ 1, -1 ] ]
133
+
// returns [ [ 0, -1 ] ]
134
134
```
135
135
136
136
By default, the function returns an [ndarray][@stdlib/ndarray/ctor] having a [data type][@stdlib/ndarray/dtypes] determined by the function's output data type [policy][@stdlib/ndarray/output-dtype-policies]. To override the default behavior, set the `dtype` option.
@@ -168,7 +168,7 @@ var out = lastIndexOf.assign( x, 2.0, y );
0 commit comments