Skip to content

Commit 0cb0647

Browse files
committed
docs: refactor
--- 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: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent cd4d303 commit 0cb0647

File tree

1 file changed

+4
-7
lines changed
  • lib/node_modules/@stdlib/blas/ext/base/ndarray/gfind-last-index

1 file changed

+4
-7
lines changed

lib/node_modules/@stdlib/blas/ext/base/ndarray/gfind-last-index/README.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ var gfindLastIndex = require( '@stdlib/blas/ext/base/ndarray/gfind-last-index' )
4141
Returns the index of the last element in a one-dimensional ndarray which passes a test implemented by a predicate function.
4242

4343
```javascript
44-
var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' );
4544
var ndarray = require( '@stdlib/ndarray/base/ctor' );
4645

4746
function isEven( v ) {
@@ -55,10 +54,9 @@ var idx = gfindLastIndex( [ x ], isEven );
5554
// returns 3
5655
```
5756

58-
If the function is unable to find a search element, the function returns `-1`.
57+
If no element passes a test implemented by a predicate function, the function returns `-1`.
5958

6059
```javascript
61-
var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' );
6260
var ndarray = require( '@stdlib/ndarray/base/ctor' );
6361

6462
function isEven( v ) {
@@ -100,11 +98,11 @@ var ctx = {
10098
'count': 0
10199
};
102100

103-
var v = gfindLastIndex( [ x ], clbk, ctx );
101+
var v = gfindLastIndex( [ x ], isEven, ctx );
104102
// returns 3
105103

106104
var count = ctx.count;
107-
// returns 4
105+
// returns 1
108106
```
109107

110108
</section>
@@ -115,8 +113,7 @@ var count = ctx.count;
115113

116114
## Notes
117115

118-
- If provided an empty one-dimensional ndarray, the function returns `-1`.
119-
- A provided callback function should return a boolean value.
116+
- If provided an empty one-dimensional ndarray, the function returns `-1`.
120117

121118
</section>
122119

0 commit comments

Comments
 (0)