Skip to content

Commit 7261c9d

Browse files
committed
fix: apply suggestions from code review
--- 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: passed - task: lint_package_json status: na - task: lint_repl_help status: passed - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - 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: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 714033e commit 7261c9d

File tree

7 files changed

+20
-20
lines changed

7 files changed

+20
-20
lines changed

lib/node_modules/@stdlib/blas/ext/last-index-of/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ var out = lastIndexOf( x, 2.0 );
4646
// returns <ndarray>
4747

4848
var idx = out.get();
49-
// returns 3
49+
// returns -1
5050
```
5151

5252
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 ] );
8989
// returns <ndarray>
9090

9191
// Perform operation:
92-
var out = lastIndexOf( x, 1.0, 3 );
92+
var out = lastIndexOf( x, 2.0, 5 );
9393
// returns <ndarray>
9494

9595
var idx = out.get();
96-
// returns -1
96+
// returns 4
9797
```
9898

9999
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, {
110110
// returns <ndarray>
111111

112112
var idx = ndarray2array( out );
113-
// returns [ 1, -1 ]
113+
// returns [ 0, -1 ]
114114
```
115115

116116
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 );
130130
// returns <ndarray>
131131

132132
var idx = ndarray2array( out );
133-
// returns [ [ 1, -1 ] ]
133+
// returns [ [ 0, -1 ] ]
134134
```
135135

136136
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 );
168168
// returns <ndarray>
169169

170170
var idx = out.get();
171-
// returns 3
171+
// returns -1
172172

173173
var bool = ( out === y );
174174
// returns true

lib/node_modules/@stdlib/blas/ext/last-index-of/docs/repl.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
Examples
6060
--------
6161
> var x = {{alias:@stdlib/ndarray/array}}( [ -1.0, 2.0, -3.0, 2.0 ] );
62-
> var y = {{alias}}( x, 2.0 );
62+
> var y = {{alias}}( x, 2.0, 3 );
6363
> var v = y.get()
6464
3
6565

@@ -121,7 +121,7 @@
121121
--------
122122
> var x = {{alias:@stdlib/ndarray/array}}( [ -1.0, 2.0, -3.0, 2.0 ] );
123123
> var out = {{alias:@stdlib/ndarray/zeros}}( [], { 'dtype': 'int32' } );
124-
> var y = {{alias}}.assign( x, 2.0, out )
124+
> var y = {{alias}}.assign( x, 2.0, 3, out )
125125
<ndarray>
126126
> var bool = ( out === y )
127127
true

lib/node_modules/@stdlib/blas/ext/last-index-of/docs/types/index.d.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ interface lastIndexOf {
9898
* // returns <ndarray>
9999
*
100100
* var idx = y.get();
101-
* // returns 3
101+
* // returns -1
102102
*/
103103
<T = unknown>( x: InputArray<T>, searchElement: SearchElement<T>, options?: Options ): OutputArray;
104104

@@ -121,11 +121,11 @@ interface lastIndexOf {
121121
*
122122
* var x = array( [ 1.0, 2.0, -3.0, 2.0, -5.0, 6.0 ] );
123123
*
124-
* var y = lastIndexOf( x, 1.0, 2 );
124+
* var y = lastIndexOf( x, 2.0, 5 );
125125
* // returns <ndarray>
126126
*
127127
* var idx = y.get();
128-
* // returns -1
128+
* // returns 3
129129
*/
130130
<T = unknown>( x: InputArray<T>, searchElement: SearchElement<T>, fromIndex: FromIndex, options?: Options ): OutputArray;
131131

@@ -159,7 +159,7 @@ interface lastIndexOf {
159159
* // returns true
160160
*
161161
* var idx = out.get();
162-
* // returns 3
162+
* // returns -1
163163
*/
164164
assign<T = unknown, U extends OutputArray = OutputArray>( x: InputArray<T>, searchElement: SearchElement<T>, out: U, options?: BaseOptions ): U;
165165

@@ -187,14 +187,14 @@ interface lastIndexOf {
187187
* 'dtype': 'int32'
188188
* } );
189189
*
190-
* var out = lastIndexOf.assign( x, 1.0, 2, y );
190+
* var out = lastIndexOf.assign( x, 1.0, 5, y );
191191
* // returns <ndarray>
192192
*
193193
* var bool = ( out === y );
194194
* // returns true
195195
*
196196
* var idx = out.get();
197-
* // returns -1
197+
* // returns 3
198198
*/
199199
assign<T = unknown, U extends OutputArray = OutputArray>( x: InputArray<T>, searchElement: SearchElement<T>, fromIndex: FromIndex, out: U, options?: BaseOptions ): U;
200200
}
@@ -222,7 +222,7 @@ interface lastIndexOf {
222222
* // returns <ndarray>
223223
*
224224
* var idx = y.get();
225-
* // returns 3
225+
* // returns -1
226226
*
227227
* @example
228228
* var zeros = require( '@stdlib/ndarray/zeros' );
@@ -240,7 +240,7 @@ interface lastIndexOf {
240240
* // returns true
241241
*
242242
* var idx = out.get();
243-
* // returns 3
243+
* // returns -1
244244
*/
245245
declare const lastIndexOf: lastIndexOf;
246246

lib/node_modules/@stdlib/blas/ext/last-index-of/lib/assign.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ var DEFAULT_DTYPE = defaults.get( 'dtypes.integer_index' );
9595
* // returns true
9696
*
9797
* var arr = ndarray2array( out );
98-
* // returns [ 1, 0 ]
98+
* // returns [ -1, 0 ]
9999
*/
100100
function assign( x, searchElement, fromIndex, out ) {
101101
var hasOptions;

lib/node_modules/@stdlib/blas/ext/last-index-of/lib/base.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ var table = {
110110
* // returns <ndarray>
111111
*
112112
* var idx = out.get();
113-
* // returns 3
113+
* // returns -1
114114
*/
115115
var lastIndexOf = factory( table, [ idtypes0, idtypes1, idtypes2 ], odtypes, policies ); // eslint-disable-line max-len
116116

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
* // returns <ndarray>
5050
*
5151
* var arr = ndarray2array( out );
52-
* // returns [ 1, 0 ]
52+
* // returns [ -1, 0 ]
5353
*/
5454

5555
// MODULES //

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ var DEFAULT_DTYPE = defaults.get( 'dtypes.integer_index' );
8686
* // returns <ndarray>
8787
*
8888
* var arr = ndarray2array( out );
89-
* // returns [ 1, 0 ]
89+
* // returns [ -1, 0 ]
9090
*/
9191
function lastIndexOf( x, searchElement, fromIndex ) {
9292
var hasOptions;

0 commit comments

Comments
 (0)