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
-[`5149a6b`](https://github.com/stdlib-js/stdlib/commit/5149a6b650b60568bd0df248c2a97a3d8ca2ca87) - **chore:** minor clean-up _(by Philipp Burckhardt)_
706
707
-[`1aff763`](https://github.com/stdlib-js/stdlib/commit/1aff763c61863b7d737a699db89729d2bba0e1bc) - **feat:** add `ndarray/spread-dimensions`[(#9424)](https://github.com/stdlib-js/stdlib/pull/9424)_(by Muhammad Haris, Athan Reines)_
Copy file name to clipboardExpand all lines: base/expand-dimensions/README.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ limitations under the License.
20
20
21
21
# expandDimensions
22
22
23
-
> Expand the shape of an array by inserting a new dimension of size one at a specified axis.
23
+
> Expand the shape of an array by inserting a new dimension of size one at a specified dimension index.
24
24
25
25
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
26
26
@@ -40,9 +40,9 @@ limitations under the License.
40
40
var expandDimensions =require( '@stdlib/ndarray/base/expand-dimensions' );
41
41
```
42
42
43
-
#### expandDimensions( x, axis, writable )
43
+
#### expandDimensions( x, dim, writable )
44
44
45
-
Expands the shape of an array `x` by inserting a new dimension of size one at a specified `axis`.
45
+
Expands the shape of an array `x` by inserting a new dimension of size one at a specified dimension index.
46
46
47
47
```javascript
48
48
var getShape =require( '@stdlib/ndarray/shape' );
@@ -77,7 +77,7 @@ sh = getShape( y );
77
77
The function accepts the following arguments:
78
78
79
79
-**x**: input ndarray.
80
-
-**axis**: axis at which to insert a singleton dimension.
80
+
-**dim**: dimension index at which to insert a singleton dimension.
81
81
-**writable**: boolean indicating whether a returned ndarray should be writable.
82
82
83
83
</section>
@@ -90,7 +90,7 @@ The function accepts the following arguments:
90
90
91
91
## Notes
92
92
93
-
- A provided axis must reside on the interval `[-N-1, N]`, where `N` is the rank (i.e., number of dimensions) of the provided input array. If provided a negative `axis`, the axis position at which to insert a singleton dimension is computed as `N + axis + 1`. Hence, if provided `-1`, the resolved axis position is `N` (i.e., a singleton dimension is appended to the input array).
93
+
- A provided dimension index must reside on the interval `[-N-1, N]`, where `N` is the rank (i.e., number of dimensions) of the provided input array. If provided a negative dimension index, the position at which to insert a singleton dimension is computed as `N + dim + 1`. Hence, if provided `-1`, the resolved position is `N` (i.e., a singleton dimension is appended to the input array).
94
94
- The `writable` parameter **only** applies to ndarray constructors supporting **read-only** instances.
Copy file name to clipboardExpand all lines: base/expand-dimensions/docs/types/index.d.ts
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -23,14 +23,14 @@
23
23
import{typedndarray}from'@stdlib/types/ndarray';
24
24
25
25
/**
26
-
* Expands the shape of an array by inserting a new dimension of size one at a specified axis.
26
+
* Expands the shape of an array by inserting a new dimension of size one at a specified dimension index.
27
27
*
28
28
* ## Notes
29
29
*
30
-
* - A provided axis must reside on the interval `[-N-1, N]`, where `N` is the rank (i.e., number of dimensions) of the provided input array. If provided a negative `axis`, the axis position at which to insert a singleton dimension is computed as `N + axis + 1`. Hence, if provided `-1`, the resolved axis position is `N` (i.e., a singleton dimension is appended to the input array).
30
+
* - A provided dimension index must reside on the interval `[-N-1, N]`, where `N` is the rank (i.e., number of dimensions) of the provided input array. If provided a negative dimension index, the position at which to insert a singleton dimension is computed as `N + dim + 1`. Hence, if provided `-1`, the resolved position is `N` (i.e., a singleton dimension is appended to the input array).
31
31
*
32
32
* @param x - input array
33
-
* @paramaxis - axis at which to insert a singleton dimension
33
+
* @paramdim - dimension index at which to insert a singleton dimension
34
34
* @param writable - boolean indicating whether the returned ndarray should be writable
35
35
* @returns output array
36
36
*
@@ -43,7 +43,7 @@ import { typedndarray } from '@stdlib/types/ndarray';
Copy file name to clipboardExpand all lines: base/expand-dimensions/lib/main.js
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -34,16 +34,16 @@ var format = require( '@stdlib/string/format' );
34
34
// MAIN //
35
35
36
36
/**
37
-
* Expands the shape of an array by inserting a new dimension of size one at a specified axis.
37
+
* Expands the shape of an array by inserting a new dimension of size one at a specified dimension index.
38
38
*
39
39
* ## Notes
40
40
*
41
-
* - A provided axis must reside on the interval `[-N-1, N]`, where `N` is the rank (i.e., number of dimensions) of the provided input array. If provided a negative `axis`, the axis position at which to insert a singleton dimension is computed as `N + axis + 1`. Hence, if provided `-1`, the resolved axis position is `N` (i.e., a singleton dimension is appended to the input array).
41
+
* - A provided dimension index must reside on the interval `[-N-1, N]`, where `N` is the rank (i.e., number of dimensions) of the provided input array. If provided a negative dimension index, the position at which to insert a singleton dimension is computed as `N + dim + 1`. Hence, if provided `-1`, the resolved position is `N` (i.e., a singleton dimension is appended to the input array).
42
42
*
43
43
* @param {ndarray} x - input array
44
-
* @param {integer} axis - axis at which to insert a singleton dimension
44
+
* @param {integer} dim - dimension index at which to insert a singleton dimension
45
45
* @param {boolean} writable - boolean indicating whether the returned ndarray should be writable
46
-
* @throws {RangeError} must provide a valid axis
46
+
* @throws {RangeError} must provide a valid dimension index
47
47
* @returns {ndarray} output array
48
48
*
49
49
* @example
@@ -55,7 +55,7 @@ var format = require( '@stdlib/string/format' );
thrownewRangeError(format('invalid argument. Specified axis is out-of-bounds. Must be on the interval: [-%u, %u]. Value: `%d`.',N+1,N,axis));
81
+
thrownewRangeError(format('invalid argument. Specified dimension index is out-of-bounds. Must be on the interval: [-%u, %u]. Value: `%d`.',N+1,N,dim));
0 commit comments