Skip to content

Commit 70f7488

Browse files
committed
chore: clean-up
--- 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: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - 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 3658ea2 commit 70f7488

3 files changed

Lines changed: 11 additions & 9 deletions

File tree

lib/node_modules/@stdlib/ndarray/base/unary-reduce-strided1d-by/README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,12 @@ Each provided ndarray should be an object with the following properties:
115115

116116
The invoked callback function is provided the following arguments:
117117

118-
- **value**: input ndarray element.
119-
- **indices**: current ndarray element indices.
118+
- **value**: current array element.
119+
- **indices**: current array element indices.
120120
- **arr**: the input ndarray.
121121

122+
To set the callback execution context, provide a `thisArg`.
123+
122124
<!-- eslint-disable max-len -->
123125

124126
```javascript
@@ -206,7 +208,7 @@ var count = ctx.count;
206208
- **arrays**: array containing a one-dimensional subarray of the input ndarray and any additional ndarray arguments as zero-dimensional ndarrays.
207209
- **options**: function options (_optional_).
208210
- **clbk**: callback function.
209-
- **thisArg**: callback execution context (_optional_).s
211+
- **thisArg**: callback execution context (_optional_).
210212
211213
- For very high-dimensional ndarrays which are non-contiguous, one should consider copying the underlying data to contiguous memory before performing a reduction in order to achieve better performance.
212214
@@ -228,7 +230,7 @@ var maxBy = require( '@stdlib/stats/base/ndarray/max-by' );
228230
var unaryReduceStrided1dBy = require( '@stdlib/ndarray/base/unary-reduce-strided1d-by' );
229231
230232
function clbk( value ) {
231-
return value * 2;
233+
return value * 2.0;
232234
}
233235
234236
var N = 10;

lib/node_modules/@stdlib/ndarray/base/unary-reduce-strided1d-by/docs/repl.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11

22
{{alias}}( fcn, arrays, dims[, options], clbk[, thisArg] )
33
Performs a reduction over a list of specified dimensions in an input ndarray
4-
via a one-dimensional strided array reduction function, according to a
5-
callback function and assigns results to a provided output ndarray.
4+
via a one-dimensional strided array reduction function accepting a callback
5+
and assigns results to a provided output ndarray.
66

77
Each provided "ndarray" should be an object with the following properties:
88

@@ -71,13 +71,13 @@
7171
> function clbk( value ) { return value * 2.0; };
7272

7373
// Define a wrapper for a statistical function...
74-
> function fcn( arrays, clbk, thisArg ) {
74+
> function fcn( arrays, cb, ctx ) {
7575
... var x = arrays[ 0 ];
7676
... var N = x.shape[ 0 ];
7777
... var d = x.data;
7878
... var s = x.strides[ 0 ];
7979
... var o = x.offset;
80-
... return {{alias:@stdlib/stats/base/max-by}}.ndarray( N, d, s, o, clbk, thisArg );
80+
... return {{alias:@stdlib/stats/base/max-by}}.ndarray( N, d, s, o, cb, ctx );
8181
... };
8282

8383
// Using minimal ndarray-like objects...

lib/node_modules/@stdlib/ndarray/base/unary-reduce-strided1d-by/examples/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ var maxBy = require( '@stdlib/stats/base/ndarray/max-by' );
2525
var unaryReduceStrided1dBy = require( './../lib' );
2626

2727
function clbk( value ) {
28-
return value * 2;
28+
return value * 2.0;
2929
}
3030

3131
var N = 10;

0 commit comments

Comments
 (0)