Skip to content

Commit c2ab7a9

Browse files
chore: updated docs and test input values
--- 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: passed - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: passed - 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 --- --- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: na - task: run_c_examples status: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: passed - task: run_c_benchmarks status: na - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: na - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: passed ---
1 parent 8ec5c91 commit c2ab7a9

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,10 @@ console.log( v );
183183
Computes the [arithmetic mean][arithmetic-mean] of a single-precision floating-point strided array `x`, ignoring `NaN` values and using Welford's algorithm.
184184

185185
```c
186-
const double x[] = { 1.0, -2.0, 0.0f/0.0f, 2.0 };
186+
const float x[] = { 1.0f, -2.0f, 0.0f/0.0f, 2.0f };
187187

188188
double v = stdlib_strided_snanmeanwd( 4, x, 1 );
189-
// returns ~0.33333
189+
// returns ~0.33333f
190190
```
191191
192192
The function accepts the following arguments:
@@ -204,10 +204,10 @@ float stdlib_strided_snanmeanwd( const CBLAS_INT N, const float *X, const CBLAS_
204204
Computes the [arithmetic mean][arithmetic-mean] of a single-precision floating-point strided array, ignoring `NaN` values and using Welford's algorithm and alternative indexing semantics.
205205

206206
```c
207-
const double x[] = { 1.0, -2.0, 0.0f/0.0f, 2.0 };
207+
const float x[] = { 1.0f, -2.0f, 0.0f/0.0f, 2.0f };
208208

209209
double v = stdlib_strided_snanmeanwd_ndarray( 4, x, 1, 0 );
210-
// returns ~0.33333
210+
// returns ~0.33333f
211211
```
212212
213213
The function accepts the following arguments:

lib/node_modules/@stdlib/stats/base/snanmeanwd/src/addon.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ static napi_value addon( napi_env env, napi_callback_info info ) {
3737
STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
3838
STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 2 );
3939
STDLIB_NAPI_ARGV_STRIDED_FLOAT32ARRAY( env, X, N, strideX, argv, 1 );
40-
STDLIB_NAPI_CREATE_DOUBLE( env, API_SUFFIX(stdlib_strided_snanmeanwd)( N, X, strideX ), v );
40+
STDLIB_NAPI_CREATE_DOUBLE( env, (double)API_SUFFIX(stdlib_strided_snanmeanwd)( N, X, strideX ), v );
4141
return v;
4242
}
4343

@@ -54,7 +54,7 @@ static napi_value addon_method( napi_env env, napi_callback_info info ) {
5454
STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 2 );
5555
STDLIB_NAPI_ARGV_INT64( env, offsetX, argv, 3 );
5656
STDLIB_NAPI_ARGV_STRIDED_FLOAT32ARRAY( env, X, N, strideX, argv, 1 );
57-
STDLIB_NAPI_CREATE_DOUBLE( env, API_SUFFIX(stdlib_strided_snanmeanwd_ndarray)( N, X, strideX, offsetX ), v );
57+
STDLIB_NAPI_CREATE_DOUBLE( env, (double)API_SUFFIX(stdlib_strided_snanmeanwd_ndarray)( N, X, strideX, offsetX ), v );
5858
return v;
5959
}
6060

lib/node_modules/@stdlib/stats/base/snanmeanwd/test/test.ndarray.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ tape( 'the function supports a `stride` parameter', function test( t ) {
104104
NaN // 4
105105
]);
106106

107-
v = snanmeanwd( 4, x, 2, 0 );
107+
v = snanmeanwd( 5, x, 2, 0 );
108108

109109
t.strictEqual( v, 1.25, 'returns expected value' );
110110
t.end();
@@ -126,7 +126,7 @@ tape( 'the function supports a negative `stride` parameter', function test( t )
126126
NaN // 0
127127
]);
128128

129-
v = snanmeanwd( 4, x, -2, 6 );
129+
v = snanmeanwd( 5, x, -2, 8 );
130130

131131
t.strictEqual( v, 1.25, 'returns expected value' );
132132
t.end();

lib/node_modules/@stdlib/stats/base/snanmeanwd/test/test.ndarray.native.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ tape( 'the function supports a `stride` parameter', opts, function test( t ) {
113113
NaN // 4
114114
]);
115115

116-
v = snanmeanwd( 4, x, 2, 0 );
116+
v = snanmeanwd( 5, x, 2, 0 );
117117

118118
t.strictEqual( v, 1.25, 'returns expected value' );
119119
t.end();
@@ -135,7 +135,7 @@ tape( 'the function supports a negative `stride` parameter', opts, function test
135135
NaN // 0
136136
]);
137137

138-
v = snanmeanwd( 4, x, -2, 6 );
138+
v = snanmeanwd( 5, x, -2, 8 );
139139

140140
t.strictEqual( v, 1.25, 'returns expected value' );
141141
t.end();

0 commit comments

Comments
 (0)