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/nanstdevyc/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
@@ -146,7 +146,7 @@ Computes the [standard deviation][standard-deviation] of a strided array ignorin
146
146
```javascript
147
147
var x = [ 1.0, -2.0, NaN, 2.0 ];
148
148
149
-
var v =nanstdevyc.ndarray( 4, 1, x, 1, 0 );
149
+
var v =nanstdevyc.ndarray( x.length, 1, x, 1, 0 );
150
150
// returns ~2.0817
151
151
```
152
152
@@ -157,9 +157,9 @@ The function has the following additional parameters:
157
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 [standard deviation][standard-deviation] for every other element in `x` starting from the second element
158
158
159
159
```javascript
160
-
var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ];
160
+
var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ];
0 commit comments