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
The `N` and `stride` parameters determine which elements in `x` are accessed at runtime. For example, to compute the minimum absolute value of every other element in `x`,
var floor =require( '@stdlib/math/base/special/floor' );
64
62
65
63
var x =newFloat64Array( [ 1.0, 2.0, -7.0, -2.0, 4.0, 3.0, NaN, NaN ] );
66
-
varN=floor( x.length/2 );
67
64
68
-
var v =dnanminabs( N, x, 2 );
65
+
var v =dnanminabs( 5, x, 2 );
69
66
// returns 1.0
70
67
```
71
68
@@ -80,40 +77,35 @@ var floor = require( '@stdlib/math/base/special/floor' );
80
77
var x0 =newFloat64Array( [ 2.0, 1.0, -2.0, -2.0, 3.0, 4.0, NaN, NaN ] );
81
78
var x1 =newFloat64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
82
79
83
-
varN=floor( x0.length/2 );
84
-
85
-
var v =dnanminabs( N, x1, 2 );
80
+
var v =dnanminabs( 5, x1, 2 );
86
81
// returns 1.0
87
82
```
88
83
89
-
#### dnanminabs.ndarray( N, x, stride, offset )
84
+
#### dnanminabs.ndarray( N, x, strideX, offsetX )
90
85
91
86
Computes the minimum absolute value of a double-precision floating-point strided array, ignoring `NaN` values and using alternative indexing semantics.
var x =newFloat64Array( [ 1.0, -2.0, NaN, 2.0 ] );
97
-
varN=x.length;
98
92
99
-
var v =dnanminabs.ndarray( N, x, 1, 0 );
93
+
var v =dnanminabs.ndarray( x.length, x, 1, 0 );
100
94
// returns 1.0
101
95
```
102
96
103
97
The function has the following additional parameters:
104
98
105
-
-**offset**: starting index for `x`.
99
+
-**offsetX**: starting index for `x`.
106
100
107
-
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 minimum absolute value for every other value in `x` starting from the second value
101
+
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 minimum absolute value for every other element in `x` starting from the second element
#### stdlib_strided_dnanminabs_ndarray( N, \*X, strideX, offsetX )
191
+
192
+
Computes the minimum absolute value of a double-precision floating-point strided array, ignoring `NaN` values and using alternative indexing semantics.
0 commit comments