Skip to content

Commit 599d246

Browse files
chore: changes from code review
1 parent 7f40a2a commit 599d246

File tree

6 files changed

+21
-21
lines changed

6 files changed

+21
-21
lines changed

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -194,13 +194,13 @@ Computes the arithmetic mean of a double-precision floating-point strided array,
194194
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 };
195195

196196
double v = stdlib_strided_dnanmeanors( 6, x, 2 );
197-
// returns 4.6667
197+
// returns ~4.6667
198198
```
199199
200200
The function accepts the following arguments:
201201
202-
- **N**: `[in] CBLAS_INT` number of indexed elements.
203-
- **X**: `[in] double*` input array.
202+
- **N**: `[in] CBLAS_INT` number of indexed elements.
203+
- **X**: `[in] double*` input array.
204204
- **strideX**: `[in] CBLAS_INT` stride length for `X`.
205205
206206
```c
@@ -215,13 +215,13 @@ Computes the arithmetic mean of a double-precision floating-point strided array,
215215
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 };
216216

217217
double v = stdlib_strided_dnanmeanors( 6, x, 2, 0 );
218-
// returns 4.6667
218+
// returns ~4.6667
219219
```
220220
221221
The function accepts the following arguments:
222222
223-
- **N**: `[in] CBLAS_INT` number of indexed elements.
224-
- **X**: `[in] double*` input array.
223+
- **N**: `[in] CBLAS_INT` number of indexed elements.
224+
- **X**: `[in] double*` input array.
225225
- **strideX**: `[in] CBLAS_INT` stride length for `X`.
226226
- **offsetX**: `[in] CBLAS_INT` starting index for `X`.
227227
@@ -253,7 +253,7 @@ double stdlib_strided_dnanmeanors_ndarray( const CBLAS_INT N, const double *X, c
253253

254254
int main( void ) {
255255
// Create a strided array:
256-
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 };
256+
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 };
257257

258258
// Specify the number of elements:
259259
const int N = 6;

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ var dnanmeanors = require( './../lib/dnanmeanors.js' );
3333
// FUNCTIONS //
3434

3535
/**
36-
* Returns a random value or `NaN`.
36+
* Returns a random number
3737
*
3838
* @private
39-
* @returns {number} random number or `NaN`
39+
* @returns {number} random number
4040
*/
4141
function rand() {
42-
if ( bernoulli( 0.8 < 1 ) ) {
42+
if ( bernoulli( 0.5 < 1 ) ) {
4343
return NaN;
4444
}
4545
return uniform( -10.0, 10.0 );

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ var opts = {
4242
// FUNCTIONS //
4343

4444
/**
45-
* Returns a random value or `NaN`.
45+
* Returns a random number
4646
*
4747
* @private
48-
* @returns {number} random number or `NaN`
48+
* @returns {number} random number
4949
*/
5050
function rand() {
51-
if ( bernoulli( 0.8 < 1 ) ) {
51+
if ( bernoulli( 0.5 < 1 ) ) {
5252
return NaN;
5353
}
5454
return uniform( -10.0, 10.0 );

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ var dnanmeanors = require( './../lib/ndarray.js' );
3333
// FUNCTIONS //
3434

3535
/**
36-
* Returns a random value or `NaN`.
36+
* Returns a random number
3737
*
3838
* @private
39-
* @returns {number} random number or `NaN`
39+
* @returns {number} random number
4040
*/
4141
function rand() {
42-
if ( bernoulli( 0.8 < 1 ) ) {
42+
if ( bernoulli( 0.5 < 1 ) ) {
4343
return NaN;
4444
}
4545
return uniform( -10.0, 10.0 );

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ var opts = {
4242
// FUNCTIONS //
4343

4444
/**
45-
* Returns a random value or `NaN`.
45+
* Returns a random number
4646
*
4747
* @private
48-
* @returns {number} random number or `NaN`
48+
* @returns {number} random number
4949
*/
5050
function rand() {
51-
if ( bernoulli( 0.8 < 1 ) ) {
51+
if ( bernoulli( 0.5 < 1 ) ) {
5252
return NaN;
5353
}
5454
return uniform( -10.0, 10.0 );

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ static double benchmark1( int iterations, int len ) {
102102
int i;
103103

104104
for ( i = 0; i < len; i++ ) {
105-
if ( rand_double() < 0.2 ) {
105+
if ( rand_double() < 0.5 ) {
106106
x[ i ] = 0.0 / 0.0; // NaN
107107
} else {
108108
x[ i ] = ( rand_double() * 20000.0 ) - 10000.0;
@@ -140,7 +140,7 @@ static double benchmark2( int iterations, int len ) {
140140
int i;
141141

142142
for ( i = 0; i < len; i++ ) {
143-
if ( rand_double() < 0.2 ) {
143+
if ( rand_double() < 0.5 ) {
144144
x[ i ] = 0.0 / 0.0; // NaN
145145
} else {
146146
x[ i ] = ( rand_double() * 20000.0 ) - 10000.0;

0 commit comments

Comments
 (0)