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/mean/README.md
+3-4Lines changed: 3 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,7 @@ var mean = require( '@stdlib/stats/base/mean' );
53
53
54
54
#### mean( N, x, strideX )
55
55
56
-
Computes the [arithmetic mean][arithmetic-mean] of a strided array`x`.
56
+
Computes the [arithmetic mean][arithmetic-mean] of a strided array.
57
57
58
58
```javascript
59
59
var x = [ 1.0, -2.0, 2.0 ];
@@ -68,7 +68,7 @@ The function has the following parameters:
68
68
-**x**: input [`Array`][mdn-array] or [`typed array`][mdn-typed-array].
69
69
-**strideX**: stride length for `x`.
70
70
71
-
The `N` and `stride` parameters determine which elements in the strided array are accessed at runtime. For example, to compute the [arithmetic mean][arithmetic-mean] of every other element in `x`,
71
+
The `N` and stride parameters determine which elements in the strided array are accessed at runtime. For example, to compute the [arithmetic mean][arithmetic-mean] of every other element in `x`,
72
72
73
73
```javascript
74
74
var x = [ 1.0, 2.0, 2.0, -7.0, -2.0, 3.0, 4.0, 2.0 ];
@@ -97,7 +97,6 @@ Computes the [arithmetic mean][arithmetic-mean] of a strided array using alterna
97
97
98
98
```javascript
99
99
var x = [ 1.0, -2.0, 2.0 ];
100
-
varN=x.length;
101
100
102
101
var v =mean.ndarray( x.length, x, 1, 0 );
103
102
// returns ~0.33333
@@ -107,7 +106,7 @@ The function has the following additional parameters:
107
106
108
107
-**offsetX**: starting index for `x`.
109
108
110
-
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 [arithmetic mean][arithmetic-mean] for every other value in `x` starting from the second value
109
+
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 [arithmetic mean][arithmetic-mean] for every other element in `x` starting from the second element
111
110
112
111
```javascript
113
112
var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ];
0 commit comments