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: lib/node_modules/@stdlib/ndarray/base/rot90/README.md
+4-4Lines changed: 4 additions & 4 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
# rot90
22
22
23
-
> Rotate an ndarray 90 degrees in the plane specified by two dimension indices.
23
+
> Rotate an ndarray 90 degrees in a specified plane.
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
@@ -57,7 +57,7 @@ var y = rot90( x, [ 0, 1 ], 1, false );
57
57
The function accepts the following arguments:
58
58
59
59
-**x**: input ndarray.
60
-
-**dims**: dimension indices defining the plane of rotation. Must contain exactly two unique dimension indices.
60
+
-**dims**: dimension indices defining the plane of rotation. Must contain exactly two unique dimension indices. If a dimension index is provided as an integer less than zero, the dimension index is resolved relative to the last dimension, with the last dimension corresponding to the value `-1`.
61
61
-**k**: number of times to rotate by 90 degrees. Positive values rotate counterclockwise. Negative values rotate clockwise.
62
62
-**writable**: boolean indicating whether a returned ndarray should be writable.
63
63
@@ -71,8 +71,8 @@ The function accepts the following arguments:
71
71
72
72
## Notes
73
73
74
-
- If `k > 0`, the function rotates the ndarray counterclockwise.
75
-
- If `k < 0`, the function rotates the ndarray clockwise.
74
+
- If `k > 0`, the function rotates the plane from the first specified dimension toward the second specified dimension. This means that, for a two-dimensional ndarray and `dims = [0, 1]`, the function rotates the plane counterclockwise.
75
+
- If `k < 0`, the function rotates the plane from the second specified dimension toward the first specified dimension. This means that, for a two-dimensional ndarray and `dims = [1, 0]`, the function rotates the plane clockwise.
76
76
- Each provided dimension index must reside on the interval `[-ndims, ndims-1]`.
77
77
- The `writable` parameter **only** applies to ndarray constructors supporting **read-only** instances.
78
78
- The returned ndarray is a **view** of the input ndarray. Accordingly, writing to the original ndarray will **mutate** the returned ndarray and vice versa.
Copy file name to clipboardExpand all lines: lib/node_modules/@stdlib/ndarray/base/rot90/docs/types/index.d.ts
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -24,12 +24,12 @@ import { typedndarray } from '@stdlib/types/ndarray';
24
24
import{Collection}from'@stdlib/types/array';
25
25
26
26
/**
27
-
* Rotates an ndarray 90 degrees in the plane specified by two dimension indices.
27
+
* Rotates an ndarray 90 degrees in a specified plane.
28
28
*
29
29
* ## Notes
30
30
*
31
-
* - If `k > 0`, the function rotates the ndarray counterclockwise.
32
-
* - If `k < 0`, the function rotates the ndarray clockwise.
31
+
* - If `k > 0`, the function rotates the plane from the first specified dimension toward the second specified dimension. This means that, for a two-dimensional ndarray and `dims = [0, 1]`, the function rotates the plane counterclockwise.
32
+
* - If `k < 0`, the function rotates the plane from the second specified dimension toward the first specified dimension. This means that, for a two-dimensional ndarray and `dims = [1, 0]`, the function rotates the plane clockwise.
33
33
* - Each provided dimension index must reside on the interval `[-ndims, ndims-1]`.
Copy file name to clipboardExpand all lines: lib/node_modules/@stdlib/ndarray/base/rot90/lib/main.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -34,12 +34,12 @@ var format = require( '@stdlib/string/format' );
34
34
// MAIN //
35
35
36
36
/**
37
-
* Rotates an ndarray 90 degrees in the plane specified by two dimension indices.
37
+
* Rotates an ndarray 90 degrees in a specified plane.
38
38
*
39
39
* ## Notes
40
40
*
41
-
* - If `k > 0`, the function rotates the ndarray counterclockwise.
42
-
* - If `k < 0`, the function rotates the ndarray clockwise.
41
+
* - If `k > 0`, the function rotates the plane from the first specified dimension toward the second specified dimension. This means that, for a two-dimensional ndarray and `dims = [0, 1]`, the function rotates the plane counterclockwise.
42
+
* - If `k < 0`, the function rotates the plane from the second specified dimension toward the first specified dimension. This means that, for a two-dimensional ndarray and `dims = [1, 0]`, the function rotates the plane clockwise.
43
43
* - Each provided dimension index must reside on the interval `[-ndims, ndims-1]`.
0 commit comments