Skip to content

Commit 5f6e0b9

Browse files
committed
docs: refactor the example
--- 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: na - task: lint_javascript_src status: na - 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 375578a commit 5f6e0b9

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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, 2.0, 3 );
92+
var out = lastIndexOf( x, 1.0, 3 );
9393
// returns <ndarray>
9494

9595
var idx = out.get();
96-
// returns 4
96+
// returns -1
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.

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,13 +119,13 @@ interface lastIndexOf {
119119
* @example
120120
* var array = require( '@stdlib/ndarray/array' );
121121
*
122-
* var x = array( [ -1.0, 2.0, -3.0, 2.0, -5.0, 6.0 ] );
122+
* var x = array( [ 1.0, 2.0, -3.0, 2.0, -5.0, 6.0 ] );
123123
*
124-
* var y = lastIndexOf( x, 2.0, 2 );
124+
* var y = lastIndexOf( x, 1.0, 2 );
125125
* // returns <ndarray>
126126
*
127127
* var idx = y.get();
128-
* // returns 3
128+
* // returns -1
129129
*/
130130
<T = unknown>( x: InputArray<T>, searchElement: SearchElement<T>, fromIndex: FromIndex, options?: Options ): OutputArray;
131131

@@ -182,19 +182,19 @@ interface lastIndexOf {
182182
* var zeros = require( '@stdlib/ndarray/zeros' );
183183
* var array = require( '@stdlib/ndarray/array' );
184184
*
185-
* var x = array( [ -1.0, 2.0, -3.0, 2.0, -5.0, 6.0 ] );
185+
* var x = array( [ 1.0, 2.0, -3.0, 2.0, -5.0, 6.0 ] );
186186
* var y = zeros( [], {
187187
* 'dtype': 'int32'
188188
* } );
189189
*
190-
* var out = lastIndexOf.assign( x, 2.0, 2, y );
190+
* var out = lastIndexOf.assign( x, 1.0, 2, y );
191191
* // returns <ndarray>
192192
*
193193
* var bool = ( out === y );
194194
* // returns true
195195
*
196196
* var idx = out.get();
197-
* // returns 3
197+
* // returns -1
198198
*/
199199
assign<T = unknown, U extends OutputArray = OutputArray>( x: InputArray<T>, searchElement: SearchElement<T>, fromIndex: FromIndex, out: U, options?: BaseOptions ): U;
200200
}

0 commit comments

Comments
 (0)