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`,
58
+
The `N` and stride parameters determine which elements in the strided array 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' );
79
75
80
76
var x0 =newFloat64Array( [ 2.0, 1.0, -2.0, -2.0, 3.0, 4.0, NaN, NaN ] );
81
77
var x1 =newFloat64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
82
78
83
-
varN=floor( x0.length/2 );
84
-
85
-
var v =dnanminabs( N, x1, 2 );
79
+
var v =dnanminabs( 5, x1, 2 );
86
80
// returns 1.0
87
81
```
88
82
89
-
#### dnanminabs.ndarray( N, x, stride, offset )
83
+
#### dnanminabs.ndarray( N, x, strideX, offsetX )
90
84
91
85
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
91
99
-
var v =dnanminabs.ndarray( N, x, 1, 0 );
92
+
var v =dnanminabs.ndarray( x.length, x, 1, 0 );
100
93
// returns 1.0
101
94
```
102
95
103
96
The function has the following additional parameters:
104
97
105
-
-**offset**: starting index for `x`.
98
+
-**offsetX**: starting index for `x`.
106
99
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
100
+
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 )
190
+
191
+
Computes the minimum absolute value of a double-precision floating-point strided array, ignoring `NaN` values and using alternative indexing semantics.
0 commit comments