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
var floor =require( '@stdlib/math/base/special/floor' );
105
101
106
102
functionaccessor( v ) {
107
103
return v *2.0;
@@ -112,16 +108,15 @@ var x0 = new Float64Array( [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ] );
112
108
113
109
// Create an offset view...
114
110
var x1 =newFloat64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
115
-
varN=floor( x0.length/2 );
116
111
117
112
// Access every other element...
118
-
var v =nanminBy( N, x1, 2, accessor );
113
+
var v =nanminBy( 3, x1, 2, accessor );
119
114
// returns -12.0
120
115
```
121
116
122
-
#### nanminBy.ndarray( N, x, stride, offset, clbk\[, thisArg] )
117
+
#### nanminBy.ndarray( N, x, strideX, offsetX, clbk\[, thisArg] )
123
118
124
-
Calculates the minimum value of strided array`x` via a callback function, ignoring `NaN` values and using alternative indexing semantics.
119
+
Computes the minimum value of a strided array via a callback function, ignoring `NaN` values and using alternative indexing semantics.
125
120
126
121
```javascript
127
122
functionaccessor( v ) {
@@ -136,9 +131,9 @@ var v = nanminBy.ndarray( x.length, x, 1, 0, accessor );
136
131
137
132
The function has the following additional parameters:
138
133
139
-
-**offset**: starting index.
134
+
-**offsetX**: starting index.
140
135
141
-
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 access only the last three elements of `x`
136
+
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 access only the last three elements of `x`
142
137
143
138
```javascript
144
139
functionaccessor( v ) {
@@ -163,6 +158,7 @@ var v = nanminBy.ndarray( 3, x, 1, x.length-3, accessor );
163
158
- A provided callback function should return a numeric value.
164
159
- If a provided callback function returns `NaN`, the value is ignored.
165
160
- If a provided callback function does not return any value (or equivalently, explicitly returns `undefined`), the value is ignored.
161
+
- Both functions support array-like objects having getter and setter accessors for array element access (e.g., [`@stdlib/array/base/accessor`][@stdlib/array/base/accessor]).
166
162
- When possible, prefer using [`dnanmin`][@stdlib/stats/strided/dnanmin], [`snanmin`][@stdlib/stats/strided/snanmin], and/or [`nanmin`][@stdlib/stats/base/nanmin], as, depending on the environment, these interfaces are likely to be significantly more performant.
167
163
168
164
</section>
@@ -176,23 +172,23 @@ var v = nanminBy.ndarray( 3, x, 1, x.length-3, accessor );
176
172
<!-- eslint no-undef: "error" -->
177
173
178
174
```javascript
179
-
var discreteUniform =require( '@stdlib/random/base/discrete-uniform' );
180
-
var randu =require( '@stdlib/random/base/randu' );
175
+
var uniform =require( '@stdlib/random/base/uniform' );
181
176
var filledarrayBy =require( '@stdlib/array/filled-by' );
177
+
var bernoulli =require( '@stdlib/random/base/bernoulli' );
182
178
var nanminBy =require( '@stdlib/stats/base/nanmin-by' );
0 commit comments