Skip to content

Commit 62c65ed

Browse files
committed
docs: update docs
--- 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: 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 7de6ac9 commit 62c65ed

File tree

3 files changed

+24
-27
lines changed

3 files changed

+24
-27
lines changed

lib/node_modules/@stdlib/stats/base/sdsnanmean/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,12 @@ var sdsnanmean = require( '@stdlib/stats/base/sdsnanmean' );
5353

5454
#### sdsnanmean( N, x, strideX )
5555

56-
Computes the [arithmetic mean][arithmetic-mean] of a single-precision floating-point strided array `x`, ignoring `NaN` values and using extended accumulation.
56+
Computes the [arithmetic mean][arithmetic-mean] of a single-precision floating-point strided array, ignoring `NaN` values and using extended accumulation.
5757

5858
```javascript
5959
var Float32Array = require( '@stdlib/array/float32' );
6060

6161
var x = new Float32Array( [ 1.0, -2.0, NaN, 2.0 ] );
62-
var N = x.length;
6362

6463
var v = sdsnanmean( x.length, x, 1 );
6564
// returns ~0.3333
@@ -158,7 +157,9 @@ function rand() {
158157
}
159158
return uniform( -50.0, 50.0 );
160159
}
160+
161161
var x = filledarrayBy( 10, 'float32', rand );
162+
console.log( x );
162163

163164
var v = sdsnanmean( x.length, x, 1 );
164165
console.log( v );
@@ -261,7 +262,7 @@ float stdlib_strided_sdsnanmean_ndarray( const CBLAS_INT N, const float *X, cons
261262

262263
int main( void ) {
263264
// Create a strided array:
264-
const float x[] = { 1.0, 2.0, 0.0/0.0, 3.0, 0.0/0.0, 4.0, 5.0, 6.0, 0.0/0.0, 7.0, 8.0, 0.0/0.0 };
265+
const float x[] = { 1.0f, 2.0f, 0.0f/0.0f, 3.0f, 0.0f/0.0f, 4.0f, 5.0f, 6.0f, 0.0f/0.0f, 7.0f, 8.0f, 0.0f/0.0f };
265266

266267
// Specify the number of elements:
267268
const int N = 6;

lib/node_modules/@stdlib/stats/base/sdsnanmean/docs/repl.txt

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11

2-
{{alias}}( N, x, stride )
2+
{{alias}}( N, x, strideX )
33
Computes the arithmetic mean of a single-precision floating-point strided
44
array, ignoring `NaN` values and using extended accumulation.
55

6-
The `N` and `stride` parameters determine which elements in `x` are accessed
7-
at runtime.
6+
The `N` and stride parameters determine which elements in the strided array
7+
are accessed at runtime.
88

99
Indexing is relative to the first index. To introduce an offset, use a typed
1010
array view.
@@ -21,8 +21,8 @@
2121
x: Float32Array
2222
Input array.
2323

24-
stride: integer
25-
Index increment.
24+
strideX: integer
25+
Stride length for `x`.
2626

2727
Returns
2828
-------
@@ -36,22 +36,19 @@
3636
> {{alias}}( x.length, x, 1 )
3737
~0.3333
3838

39-
// Using `N` and `stride` parameters:
39+
// Using `N` and stride parameters:
4040
> x = new {{alias:@stdlib/array/float32}}( [ -2.0, 1.0, 1.0, -5.0, 2.0, -1.0, NaN ] );
41-
> var N = {{alias:@stdlib/math/base/special/floor}}( x.length / 2 );
42-
> var stride = 2;
43-
> {{alias}}( N, x, stride )
41+
> {{alias}}( 3, x, 2 )
4442
~0.3333
4543

4644
// Using view offsets:
4745
> var x0 = new {{alias:@stdlib/array/float32}}( [ 1.0, -2.0, 3.0, 2.0, 5.0, -1.0, NaN ] );
4846
> var x1 = new {{alias:@stdlib/array/float32}}( x0.buffer, x0.BYTES_PER_ELEMENT*1 );
49-
> N = {{alias:@stdlib/math/base/special/floor}}( x0.length / 2 );
50-
> stride = 2;
51-
> {{alias}}( N, x1, stride )
47+
> {{alias}}( 3, x1, 2 )
5248
~-0.3333
5349

54-
{{alias}}.ndarray( N, x, stride, offset )
50+
51+
{{alias}}.ndarray( N, x, strideX, offsetX )
5552
Computes the arithmetic mean of a single-precision floating-point strided
5653
array, ignoring `NaN` values and using extended accumulation and alternative
5754
indexing semantics.
@@ -68,11 +65,11 @@
6865
x: Float32Array
6966
Input array.
7067

71-
stride: integer
68+
strideX: integer
7269
Index increment.
7370

74-
offset: integer
75-
Starting index.
71+
offsetX: integer
72+
Stride length for `x`.
7673

7774
Returns
7875
-------
@@ -88,8 +85,7 @@
8885

8986
// Using offset parameter:
9087
> var x = new {{alias:@stdlib/array/float32}}( [ 1.0, -2.0, 3.0, 2.0, 5.0, -1.0, NaN ] );
91-
> var N = {{alias:@stdlib/math/base/special/floor}}( x.length / 2 );
92-
> {{alias}}.ndarray( N, x, 2, 1 )
88+
> {{alias}}.ndarray( 3, x, 2, 1 )
9389
~-0.3333
9490

9591
See Also

lib/node_modules/@stdlib/stats/base/sdsnanmean/docs/types/index.d.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ interface Routine {
2727
*
2828
* @param N - number of indexed elements
2929
* @param x - input array
30-
* @param stride - stride length
30+
* @param strideX - stride length
3131
* @returns arithmetic mean
3232
*
3333
* @example
@@ -38,15 +38,15 @@ interface Routine {
3838
* var v = sdsnanmean( x.length, x, 1 );
3939
* // returns ~0.3333
4040
*/
41-
( N: number, x: Float32Array, stride: number ): number;
41+
( N: number, x: Float32Array, strideX: number ): number;
4242

4343
/**
4444
* Computes the arithmetic mean of a single-precision floating-point strided array, ignoring `NaN` values and using extended accumulation and alternative indexing semantics.
4545
*
4646
* @param N - number of indexed elements
4747
* @param x - input array
48-
* @param stride - stride length
49-
* @param offset - starting index
48+
* @param strideX - stride length
49+
* @param offsetX - starting index
5050
* @returns arithmetic mean
5151
*
5252
* @example
@@ -57,15 +57,15 @@ interface Routine {
5757
* var v = sdsnanmean.ndarray( x.length, x, 1, 0 );
5858
* // returns ~0.3333
5959
*/
60-
ndarray( N: number, x: Float32Array, stride: number, offset: number ): number;
60+
ndarray( N: number, x: Float32Array, strideX: number, offsetX: number ): number;
6161
}
6262

6363
/**
6464
* Computes the arithmetic mean of a single-precision floating-point strided array, ignoring `NaN` values and using extended accumulation.
6565
*
6666
* @param N - number of indexed elements
6767
* @param x - input array
68-
* @param stride - stride length
68+
* @param strideX - stride length
6969
* @returns arithmetic mean
7070
*
7171
* @example

0 commit comments

Comments
 (0)