You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/node_modules/@stdlib/stats/base/nanvarianceyc/README.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -119,9 +119,9 @@ The function has the following parameters:
119
119
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`,
120
120
121
121
```javascript
122
-
var x = [ 1.0, 2.0, 2.0, -7.0, -2.0, 3.0, 4.0, 2.0, NaN ];
122
+
var x = [ 1.0, 2.0, 2.0, -7.0, -2.0, 3.0, 4.0, 2.0, NaN, NaN ];
123
123
124
-
var v =nanvarianceyc( 4, 1, x, 2 );
124
+
var v =nanvarianceyc( 5, 1, x, 2 );
125
125
// returns 6.25
126
126
```
127
127
@@ -132,10 +132,10 @@ Note that indexing is relative to the first index. To introduce an offset, use [
var x0 =newFloat64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN ] );
135
+
var x0 =newFloat64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );
136
136
var x1 =newFloat64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
137
137
138
-
var v =nanvarianceyc( 4, 1, x1, 2 );
138
+
var v =nanvarianceyc( 5, 1, x1, 2 );
139
139
// returns 6.25
140
140
```
141
141
@@ -154,7 +154,7 @@ The function has the following additional parameters:
154
154
155
155
-**offsetX**: starting index for `x`.
156
156
157
-
While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying `buffer`, the `offset` parameter supports indexing semantics based on a starting index. For example, to calculate the [variance][variance] for every other value in `x` starting from the second value
157
+
While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying buffer, the offset parameter supports indexing semantics based on a starting index. For example, to calculate the [variance][variance] for every other value in `x` starting from the second value
158
158
159
159
```javascript
160
160
var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ];
0 commit comments