Skip to content

Commit c4ae26e

Browse files
committed
fix: addressing first round comments
1 parent 217680d commit c4ae26e

2 files changed

Lines changed: 12 additions & 10 deletions

File tree

lib/node_modules/@stdlib/stats/strided/dnanvarmpn/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,12 @@ var v = dnanvarmpn( x.length, 1, 1.0/3.0, x, 1 );
114114
The function has the following parameters:
115115

116116
- **N**: number of indexed elements.
117-
- **correction**: degrees of freedom adjustment. Setting this parameter to a value other than `0` has the effect of adjusting the divisor during the calculation of the [variance][variance] according to `N-c` where `c` corresponds to the provided degrees of freedom adjustment. When computing the [variance][variance] of a population, setting this parameter to `0` is the standard choice (i.e., the provided array contains data constituting an entire population). When computing the unbiased sample [variance][variance], setting this parameter to `1` is the standard choice (i.e., the provided array contains data sampled from a larger population; this is commonly referred to as Bessel's correction).
117+
- **correction**: degrees of freedom adjustment. Setting this parameter to a value other than `0` has the effect of adjusting the divisor during the calculation of the [variance][variance] according to `n-c` where `c` corresponds to the provided degrees of freedom adjustment and `n` corresponds to the number of non-`NaN` indexed elements. When computing the [variance][variance] of a population, setting this parameter to `0` is the standard choice (i.e., the provided array contains data constituting an entire population). When computing the unbiased sample [variance][variance], setting this parameter to `1` is the standard choice (i.e., the provided array contains data sampled from a larger population; this is commonly referred to as Bessel's correction).
118118
- **mean**: mean.
119119
- **x**: input [`Float64Array`][@stdlib/array/float64].
120120
- **strideX**: stride length for `x`.
121121

122-
The `N` and stride parameters determine which elements in the strided array are accessed at runtime For example, to compute the [variance][variance] of every other element in `x`,
122+
The `N` and stride parameters determine which elements in the strided array are accessed at runtime. For example, to compute the [variance][variance] of every other element in `x`,
123123

124124
```javascript
125125
var Float64Array = require( '@stdlib/array/float64' );
@@ -158,7 +158,7 @@ var Float64Array = require( '@stdlib/array/float64' );
158158
var x = new Float64Array( [ 1.0, -2.0, NaN, 2.0 ] );
159159

160160
var v = dnanvarmpn.ndarray( x.length, 1, 1.0/3.0, x, 1, 0 );
161-
// returns ~4.33333
161+
// returns ~4.3333
162162
```
163163

164164
The function has the following additional parameters:
@@ -187,7 +187,7 @@ var v = dnanvarmpn.ndarray( 5, 1, 1.25, x, 2, 1 );
187187
## Notes
188188

189189
- If `N <= 0`, both functions return `NaN`.
190-
- If `N - c` is less than or equal to `0` (where `c` corresponds to the provided degrees of freedom adjustment), both functions return `NaN`.
190+
- If `n - c` is less than or equal to `0` (where `c` corresponds to the provided degrees of freedom adjustment and `n` corresponds to the number of non-`NaN` indexed elements), both functions return `NaN`.
191191

192192
</section>
193193

@@ -263,8 +263,8 @@ double v = stdlib_strided_dnanvarmpn( 5, 1.0, 1.25, x, 2 );
263263
The function accepts the following arguments:
264264
265265
- **N**: `[in] CBLAS_INT` number of indexed elements.
266+
- **correction**: `[in] double` degrees of freedom adjustment. Setting this parameter to a value other than `0` has the effect of adjusting the divisor during the calculation of the [variance][variance] according to `n-c` where `c` corresponds to the provided degrees of freedom adjustment and `n` corresponds to the number of non-`NaN` indexed elements. When computing the [variance][variance] of a population, setting this parameter to `0` is the standard choice (i.e., the provided array contains data constituting an entire population). When computing the unbiased sample [variance][variance], setting this parameter to `1` is the standard choice (i.e., the provided array contains data sampled from a larger population; this is commonly referred to as Bessel's correction).
266267
- **mean**: `[in] double` mean.
267-
- **correction**: `[in] double` degrees of freedom adjustment. Setting this parameter to a value other than `0` has the effect of adjusting the divisor during the calculation of the [variance][variance] according to `N-c` where `c` corresponds to the provided degrees of freedom adjustment. When computing the [variance][variance] of a population, setting this parameter to `0` is the standard choice (i.e., the provided array contains data constituting an entire population). When computing the unbiased sample [variance][variance], setting this parameter to `1` is the standard choice (i.e., the provided array contains data sampled from a larger population; this is commonly referred to as Bessel's correction).
268268
- **X**: `[in] double*` input array.
269269
- **strideX**: `[in] CBLAS_INT` stride length for `X`.
270270
@@ -286,7 +286,7 @@ double v = stdlib_strided_dnanvarmpn_ndarray( 5, 1.0, 1.25, x, 2, 0 );
286286
The function accepts the following arguments:
287287
288288
- **N**: `[in] CBLAS_INT` number of indexed elements.
289-
- **correction**: `[in] double` degrees of freedom adjustment. Setting this parameter to a value other than `0` has the effect of adjusting the divisor during the calculation of the [variance][variance] according to `N-c` where `c` corresponds to the provided degrees of freedom adjustment. When computing the [variance][variance] of a population, setting this parameter to `0` is the standard choice (i.e., the provided array contains data constituting an entire population). When computing the unbiased sample [variance][variance], setting this parameter to `1` is the standard choice (i.e., the provided array contains data sampled from a larger population; this is commonly referred to as Bessel's correction).
289+
- **correction**: `[in] double` degrees of freedom adjustment. Setting this parameter to a value other than `0` has the effect of adjusting the divisor during the calculation of the [variance][variance] according to `n-c` where `c` corresponds to the provided degrees of freedom adjustment and `n` corresponds to the number of non-`NaN` indexed elements. When computing the [variance][variance] of a population, setting this parameter to `0` is the standard choice (i.e., the provided array contains data constituting an entire population). When computing the unbiased sample [variance][variance], setting this parameter to `1` is the standard choice (i.e., the provided array contains data sampled from a larger population; this is commonly referred to as Bessel's correction).
290290
- **mean**: `[in] double` mean.
291291
- **X**: `[in] double*` input array.
292292
- **strideX**: `[in] CBLAS_INT` stride length for `X`.

lib/node_modules/@stdlib/stats/strided/dnanvarmpn/docs/repl.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@
2020
correction: number
2121
Degrees of freedom adjustment. Setting this parameter to a value other
2222
than `0` has the effect of adjusting the divisor during the calculation
23-
of the variance according to `N - c` where `c` corresponds to the
24-
provided degrees of freedom adjustment. When computing the variance of a
23+
of the variance according to `n - c` where `c` corresponds to the
24+
provided degrees of freedom adjustment and `n` corresponds to the
25+
number of non-`NaN` indexed elements. When computing the variance of a
2526
population, setting this parameter to `0` is the standard choice (i.e.,
2627
the provided array contains data constituting an entire population).
2728
When computing the unbiased sample variance, setting this parameter to
@@ -79,8 +80,9 @@
7980
correction: number
8081
Degrees of freedom adjustment. Setting this parameter to a value other
8182
than `0` has the effect of adjusting the divisor during the calculation
82-
of the variance according to `N - c` where `c` corresponds to the
83-
provided degrees of freedom adjustment. When computing the variance of a
83+
of the variance according to `n - c` where `c` corresponds to the
84+
provided degrees of freedom adjustment and `n` corresponds to the
85+
number of non-`NaN` indexed elements. When computing the variance of a
8486
population, setting this parameter to `0` is the standard choice (i.e.,
8587
the provided array contains data constituting an entire population).
8688
When computing the unbiased sample variance, setting this parameter to

0 commit comments

Comments
 (0)