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
{{ message }}
Repository navigation
Commit 7f18df7
Browse filesBrowse the repository at this point in the historyBrowse files
var ndarray =require( '@stdlib/ndarray-base-ctor' );
139
+
var Float32Vector =require( '@stdlib/ndarray-vector-float32' );
141
140
var scalar2ndarray =require( '@stdlib/ndarray-from-scalar' );
142
141
143
-
var opts = {
142
+
var x =newFloat32Vector( [ 1.0, -2.0, 2.0 ] );
143
+
var correction =scalar2ndarray( 1.0, {
144
144
'dtype':'float32'
145
-
};
146
-
147
-
var xbuf =newFloat32Array( [ 1.0, -2.0, 2.0 ] );
148
-
var x =newndarray( opts.dtype, xbuf, [ 3 ], [ 1 ], 0, 'row-major' );
149
-
var correction =scalar2ndarray( 1.0, opts );
145
+
});
150
146
151
147
var v =sstdev( [ x, correction ] );
152
148
// returns ~2.0817
153
149
```
154
150
155
151
The function has the following parameters:
156
152
157
-
-**arrays**: array-like object containing two elements: a one-dimensional input ndarray and a zero-dimensional ndarray specifying the degrees of freedom adjustment. Providing a non-zero degrees of freedom adjustment has the effect of adjusting the divisor during the calculation of the [standard deviation][standard-deviation] according to `N-c` where `N` is the number of elements in the input ndarray and `c` corresponds to the provided degrees of freedom adjustment. When computing the [standard deviation][standard-deviation] 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 corrected sample [standard deviation][standard-deviation], 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).
153
+
-**arrays**: array-like object containing the following ndarrays:
154
+
155
+
- a one-dimensional input ndarray.
156
+
- a zero-dimensional ndarray specifying the degrees of freedom adjustment. Providing a non-zero degrees of freedom adjustment has the effect of adjusting the divisor during the calculation of the [standard deviation][standard-deviation] according to `N-c` where `N` is the number of elements in the input ndarray and `c` corresponds to the provided degrees of freedom adjustment. When computing the [standard deviation][standard-deviation] 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 corrected sample [standard deviation][standard-deviation], 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).
158
157
159
158
</section>
160
159
@@ -178,9 +177,7 @@ The function has the following parameters:
178
177
<!-- eslint no-undef: "error" -->
179
178
180
179
```javascript
181
-
var discreteUniform =require( '@stdlib/random-array-discrete-uniform' );
* Computes the standard deviation of a one-dimensional ndarray.
27
27
*
28
-
* @param arrays - array-like object containing a one-dimensional input ndarray and a zero-dimensional ndarray specifying a degrees of freedom adjustment
28
+
* ## Notes
29
+
*
30
+
* - The function expects the following ndarrays:
31
+
*
32
+
* - a one-dimensional input ndarray.
33
+
* - a zero-dimensional ndarray specifying the degrees of freedom adjustment.
0 commit comments