We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5e854e9 commit 5f7f634Copy full SHA for 5f7f634
6 files changed
CHANGELOG.md
@@ -844,6 +844,7 @@ A total of 49 issues were closed in this release:
844
845
<details>
846
847
+- [`5426e50`](https://github.com/stdlib-js/stdlib/commit/5426e503c7239b8672e8f2c9621ec0dfc9dcf391) - **docs:** improve doctests for ndarray instances in `ndarray/to-reversed` [(#11506)](https://github.com/stdlib-js/stdlib/pull/11506) _(by Uday Kakade, Athan Reines)_
848
- [`448abe7`](https://github.com/stdlib-js/stdlib/commit/448abe7364d055ee1f0e069276024ad9fec9c179) - **docs:** improve doctests for ndarray instances in `ndarray/reverse` [(#11508)](https://github.com/stdlib-js/stdlib/pull/11508) _(by Uday Kakade)_
849
- [`4c6c7a1`](https://github.com/stdlib-js/stdlib/commit/4c6c7a13a022fb679e9f7793ce06b06674b21956) - **docs:** improve doctests for ndarray instances in `ndarray/base/reverse` [(#11509)](https://github.com/stdlib-js/stdlib/pull/11509) _(by Uday Kakade)_
850
- [`c1376cb`](https://github.com/stdlib-js/stdlib/commit/c1376cb9550a82c5c2377a7c97f1ce4a59ea141a) - **docs:** improve doctests for ndarray instances in `ndarray/base/to-reversed` [(#11511)](https://github.com/stdlib-js/stdlib/pull/11511) _(by Uday Kakade)_
to-reversed/README.md
@@ -46,21 +46,14 @@ Returns a new [`ndarray`][@stdlib/ndarray/ctor] where the order of elements of a
46
47
```javascript
48
var array = require( '@stdlib/ndarray/array' );
49
-var ndarray2array = require( '@stdlib/ndarray/to-array' );
50
51
var x = array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ], {
52
'shape': [ 3, 2 ]
53
});
54
-// returns <ndarray>
55
-
56
-var arr = ndarray2array( x );
57
-// returns [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ]
+// returns <ndarray>[ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ]
58
59
var y = toReversed( x );
60
61
62
-arr = ndarray2array( y );
63
-// returns [ [ 6.0, 5.0 ], [ 4.0, 3.0 ], [ 2.0, 1.0 ] ]
+// returns <ndarray>[ [ 6.0, 5.0 ], [ 4.0, 3.0 ], [ 2.0, 1.0 ] ]
64
```
65
66
</section>
to-reversed/docs/repl.txt
@@ -17,13 +17,9 @@
17
Examples
18
--------
19
> var x = {{alias:@stdlib/ndarray/array}}( [ [ 1, 2 ], [ 3, 4 ] ] )
20
- <ndarray>
21
- > {{alias:@stdlib/ndarray/to-array}}( x )
22
- [ [ 1, 2 ], [ 3, 4 ] ]
+ <ndarray>[ [ 1, 2 ], [ 3, 4 ] ]
23
> var y = {{alias}}( x )
24
25
- > {{alias:@stdlib/ndarray/to-array}}( y )
26
- [ [ 4, 3 ], [ 2, 1 ] ]
+ <ndarray>[ [ 4, 3 ], [ 2, 1 ] ]
27
28
See Also
29
to-reversed/docs/types/index.d.ts
@@ -30,24 +30,17 @@ import { ndarray } from '@stdlib/types/ndarray';
30
*
31
* @example
32
* var ndarray = require( '@stdlib/ndarray/ctor' );
33
-* var ndarray2array = require( '@stdlib/ndarray/to-array' );
34
35
* var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];
36
* var shape = [ 3, 2 ];
37
* var strides = [ 2, 1 ];
38
* var offset = 0;
39
40
* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );
41
-* // returns <ndarray>
42
-*
43
-* var arr = ndarray2array( x );
44
-* // returns [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ]
+* // returns <ndarray>[ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ]
45
* var y = toReversed( x );
-* arr = ndarray2array( y );
-* // returns [ [ 6.0, 5.0 ], [ 4.0, 3.0 ], [ 2.0, 1.0 ] ]
+* // returns <ndarray>[ [ 6.0, 5.0 ], [ 4.0, 3.0 ], [ 2.0, 1.0 ] ]
*/
declare function toReversed<T extends ndarray = ndarray>( x: T ): T;
to-reversed/lib/index.js
@@ -25,7 +25,6 @@
* var toReversed = require( '@stdlib/ndarray/to-reversed' );
@@ -34,16 +33,10 @@
// MODULES //
to-reversed/lib/main.js
@@ -36,24 +36,17 @@ var format = require( '@stdlib/string/format' );
function toReversed( x ) {
if ( !isndarrayLike( x ) ) {
0 commit comments