Skip to content

Commit a1c366a

Browse files
chore: address commit comments
PR-URL: #5492 Closes: #5430 Co-authored-by: Neeraj Pathak <[email protected]> Reviewed-by: Philipp Burckhardt <[email protected]> Signed-off-by: Harsh <[email protected]>
1 parent 483ccab commit a1c366a

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,22 +120,23 @@ The function has the following parameters:
120120

121121
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`,
122122

123+
<!-- eslint-disable max-len -->
124+
123125
```javascript
124126
var Float64Array = require( '@stdlib/array/float64' );
125127

126-
var x = new Float64Array([1.0, 2.0, 2.0, -7.0, -2.0, 3.0, 4.0, 2.0, NaN, NaN]);
128+
var x = new Float64Array( [ 1.0, 2.0, 2.0, -7.0, -2.0, 3.0, 4.0, 2.0, NaN, NaN ] );
127129

128130
var v = dnanvariancech( 5, 1, x, 2 );
129131
// returns 6.25
130132
```
131133

132134
Note that indexing is relative to the first index. To introduce an offset, use [`typed array`][mdn-typed-array] views.
133135

134-
<!-- eslint-disable stdlib/capitalized-comments -->
136+
<!-- eslint-disable stdlib/capitalized-comments, max-len -->
135137

136138
```javascript
137139
var Float64Array = require( '@stdlib/array/float64' );
138-
139140
var x0 = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] ); // eslint-disable-line max-len
140141
var x1 = new Float64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
141142

@@ -150,7 +151,7 @@ Computes the [variance][variance] of a double-precision floating-point strided a
150151
```javascript
151152
var Float64Array = require( '@stdlib/array/float64' );
152153

153-
var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );
154+
var x = new Float64Array( [ 1.0, -2.0, NaN, 2.0 ] );
154155

155156
var v = dnanvariancech.ndarray( x.length, 1, x, 1, 0 );
156157
// returns ~4.33333

lib/node_modules/@stdlib/stats/base/dnanvariancech/examples/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ function rand() {
3131
}
3232

3333
var x = filledarrayBy( 10, 'float64', rand );
34+
console.log( x );
3435

3536
var v = dnanvariancech( x.length, 1, x, 1 );
3637
console.log( v );

0 commit comments

Comments
 (0)