Skip to content

Commit 6463011

Browse files
chore: changes from code review
1 parent 008160e commit 6463011

File tree

11 files changed

+17
-18
lines changed

11 files changed

+17
-18
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,13 +183,13 @@ console.log( v );
183183

184184
#### stdlib_strided_dnanmean( N, \*X, strideX )
185185

186-
Calculate the arithmetic mean of a double-precision floating-point strided array `x`, ignoring `NaN` values.
186+
Computes the arithmetic mean of a double-precision floating-point strided array `x`, ignoring `NaN` values.
187187

188188
```c
189189
const double 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 };
190190

191191
double v = stdlib_strided_dnanmean( 6, x, 2 );
192-
// returns 1.25
192+
// returns 4.66
193193
```
194194
195195
The function accepts the following arguments:
@@ -204,13 +204,13 @@ double stdlib_strided_dnanmean( const CBLAS_INT N, const double *X, const CBLAS_
204204

205205
#### stdlib_strided_dnanmean_ndarray( N, \*X, strideX, offsetX )
206206

207-
Computes the arithmetic value of a double-precision floating-point strided array, ignoring `NaN` values and using alternative indexing semantics.
207+
Computes the arithmetic mean of a double-precision floating-point strided array, ignoring `NaN` values and using alternative indexing semantics.
208208

209209
```c
210210
const double 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 };
211211

212212
double v = stdlib_strided_dnanmean_ndarray( 6, x, 2, 0 );
213-
// returns 1.25
213+
// returns 4.66
214214
```
215215
216216
The function accepts the following arguments:

lib/node_modules/@stdlib/stats/base/dnanmean/benchmark/benchmark.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ var dnanmean = require( './../lib/dnanmean.js' );
3636
* Returns a random value or `NaN`.
3737
*
3838
* @private
39-
* @returns {number} Random number or `NaN`
39+
* @returns {number} random number or `NaN`
4040
*/
4141
function rand() {
4242
if ( bernoulli( 0.2 ) ) {

lib/node_modules/@stdlib/stats/base/dnanmean/benchmark/benchmark.native.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ var opts = {
4545
* Returns a random value or `NaN`.
4646
*
4747
* @private
48-
* @returns {number} Random number or `NaN`
48+
* @returns {number} random number or `NaN`
4949
*/
5050
function rand() {
5151
if ( bernoulli( 0.2 ) ) {

lib/node_modules/@stdlib/stats/base/dnanmean/benchmark/benchmark.ndarray.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ var dnanmean = require( './../lib/ndarray.js' );
3636
* Returns a random value or `NaN`.
3737
*
3838
* @private
39-
* @returns {number} Random number or `NaN`
39+
* @returns {number} random number or `NaN`
4040
*/
4141
function rand() {
4242
if ( bernoulli( 0.2 ) ) {

lib/node_modules/@stdlib/stats/base/dnanmean/benchmark/benchmark.ndarray.native.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ var opts = {
4545
* Returns a random value or `NaN`.
4646
*
4747
* @private
48-
* @returns {number} Random number or `NaN`
48+
* @returns {number} random number or `NaN`
4949
*/
5050
function rand() {
5151
if ( bernoulli( 0.2 ) ) {

lib/node_modules/@stdlib/stats/base/dnanmean/benchmark/c/benchmark.length.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ static double benchmark1( int iterations, int len ) {
119119
printf( "should not return NaN\n" );
120120
}
121121
return elapsed;
122-
123122
}
124123

125124
/**

lib/node_modules/@stdlib/stats/base/dnanmean/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,5 @@ double API_SUFFIX(stdlib_strided_dnanmean)( const CBLAS_INT N, const double *X,
4444
* @return output value
4545
*/
4646
double API_SUFFIX(stdlib_strided_dnanmean_ndarray)( const CBLAS_INT N, const double *X, const CBLAS_INT strideX, const CBLAS_INT offsetX ) {
47-
return stdlib_strided_dnanmeanpn( N, X, strideX );
47+
return stdlib_strided_dnanmeanpn( N, X, strideX, offsetX );
4848
}

lib/node_modules/@stdlib/stats/base/dnanmean/test/test.dnanmean.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 = dnanmean( 4, x, 2 );
107+
v = dnanmean( 5, x, 2 );
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 = dnanmean( 4, x, -2 );
129+
v = dnanmean( 5, x, -2 );
130130

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

lib/node_modules/@stdlib/stats/base/dnanmean/test/test.dnanmean.native.js

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

198-
v = dnanmean( 4, x, 2 );
198+
v = dnanmean( 5, x, 2 );
199199

200200
t.strictEqual( v, 1.25, 'returns expected value' );
201201
t.end();
@@ -217,7 +217,7 @@ tape( 'the function supports a negative `stride` parameter', opts, function test
217217
NaN // 0
218218
]);
219219

220-
v = dnanmean( 4, x, -2 );
220+
v = dnanmean( 5, x, -2 );
221221

222222
t.strictEqual( v, 1.25, 'returns expected value' );
223223
t.end();

lib/node_modules/@stdlib/stats/base/dnanmean/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 = dnanmean( 4, x, 2, 0 );
107+
v = dnanmean( 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 = dnanmean( 4, x, -2, 6 );
129+
v = dnanmean( 5, x, -2, 8 );
130130

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

0 commit comments

Comments
 (0)