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: nanmaxabs/README.md
+11-40Lines changed: 11 additions & 40 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,10 +40,7 @@ var array = require( '@stdlib/ndarray/array' );
40
40
var x =array( [ -1.0, 2.0, NaN ] );
41
41
42
42
var y =nanmaxabs( x );
43
-
// returns <ndarray>
44
-
45
-
var v =y.get();
46
-
// returns 2.0
43
+
// returns <ndarray>[ 2.0 ]
47
44
```
48
45
49
46
The function has the following parameters:
@@ -60,81 +57,58 @@ The function accepts the following options:
60
57
By default, the function performs a reduction over all elements in a provided input [ndarray][@stdlib/ndarray/ctor]. To perform a reduction over specific dimensions, provide a `dims` option.
61
58
62
59
```javascript
63
-
var ndarray2array =require( '@stdlib/ndarray/to-array' );
By default, the function excludes reduced dimensions from the output [ndarray][@stdlib/ndarray/ctor]. To include the reduced dimensions as singleton dimensions, set the `keepdims` option to `true`.
99
85
100
86
```javascript
101
-
var ndarray2array =require( '@stdlib/ndarray/to-array' );
By default, the function returns an [ndarray][@stdlib/ndarray/ctor] having a [data type][@stdlib/ndarray/dtypes] determined by the function's output data type [policy][@stdlib/ndarray/output-dtype-policies]. To override the default behavior, set the `dtype` option.
@@ -150,7 +124,7 @@ var x = array( [ -1.0, 2.0, NaN ], {
150
124
var y =nanmaxabs( x, {
151
125
'dtype':'float64'
152
126
});
153
-
// returns <ndarray>
127
+
// returns <ndarray>[ 2.0 ]
154
128
155
129
var dt =String( getDType( y ) );
156
130
// returns 'float64'
@@ -168,10 +142,7 @@ var x = array( [ -1.0, 2.0, NaN ] );
Copy file name to clipboardExpand all lines: nanmaxabs/docs/types/index.d.ts
+4-16Lines changed: 4 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -75,10 +75,7 @@ interface Unary {
75
75
* var x = array( [ -1.0, 2.0, NaN ] );
76
76
*
77
77
* var y = nanmaxabs( x );
78
-
* // returns <ndarray>
79
-
*
80
-
* var v = y.get();
81
-
* // returns 2.0
78
+
* // returns <ndarray>[ 2.0 ]
82
79
*/
83
80
<T=unknown,U=unknown>(x: InputArray<T>,options?: Options): OutputArray<U>;// NOTE: we lose type specificity here, but retaining specificity would likely be difficult and/or tedious to completely enumerate, as the output ndarray data type is dependent on how `x` interacts with output data type policy and whether that policy has been overridden by `options.dtype`.
0 commit comments