Skip to content

Commit 28180a0

Browse files
committed
Auto-generated commit
1 parent 6145399 commit 28180a0

File tree

6 files changed

+11
-45
lines changed

6 files changed

+11
-45
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -844,6 +844,7 @@ A total of 49 issues were closed in this release:
844844

845845
<details>
846846

847+
- [`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)_
847848
- [`6d6b9d4`](https://github.com/stdlib-js/stdlib/commit/6d6b9d42d8904ca49fb55e2ca464780573886aa0) - **bench:** refactor to use string interpolation in `@stdlib/ndarray` [(#11446)](https://github.com/stdlib-js/stdlib/pull/11446) _(by Karan Anand)_
848849
- [`13ec30d`](https://github.com/stdlib-js/stdlib/commit/13ec30d69ff91423504ba76bf5de59b0322ff8db) - **bench:** refactor to use string interpolation in `@stdlib/ndarray/base` [(#11435)](https://github.com/stdlib-js/stdlib/pull/11435) _(by Karan Anand)_
849850
- [`ad3f046`](https://github.com/stdlib-js/stdlib/commit/ad3f04667c2cc32b6e749d8b08259afecff3f1e8) - **bench:** refactor to use string interpolation in `@stdlib/ndarray/base` [(#11434)](https://github.com/stdlib-js/stdlib/pull/11434) _(by Karan Anand)_

base/to-reversed/README.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,30 +46,23 @@ Returns a new ndarray where the order of elements of an input ndarray is reverse
4646

4747
```javascript
4848
var ndarray = require( '@stdlib/ndarray/ctor' );
49-
var ndarray2array = require( '@stdlib/ndarray/to-array' );
5049

5150
var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];
5251
var shape = [ 3, 2 ];
5352
var strides = [ 2, 1 ];
5453
var offset = 0;
5554

5655
var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );
57-
// returns <ndarray>
56+
// returns <ndarray>[ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ]
5857

5958
var sh = x.shape;
6059
// returns [ 3, 2 ]
6160

62-
var arr = ndarray2array( x );
63-
// returns [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ]
64-
6561
var y = toReversed( x );
66-
// returns <ndarray>
62+
// returns <ndarray>[ [ 6.0, 5.0 ], [ 4.0, 3.0 ], [ 2.0, 1.0 ] ]
6763

6864
sh = y.shape;
6965
// returns [ 3, 2 ]
70-
71-
arr = ndarray2array( y );
72-
// returns [ [ 6.0, 5.0 ], [ 4.0, 3.0 ], [ 2.0, 1.0 ] ]
7366
```
7467

7568
The function accepts the following arguments:

base/to-reversed/docs/repl.txt

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,9 @@
1515

1616
Examples
1717
--------
18-
> var x = {{alias:@stdlib/ndarray/array}}( [ [ 1, 2 ], [ 3, 4 ] ] )
19-
<ndarray>
20-
> x.shape
21-
[ 2, 2 ]
18+
> var x = {{alias:@stdlib/ndarray/array}}( [ [ 1, 2 ], [ 3, 4 ] ] );
2219
> var y = {{alias}}( x )
23-
<ndarray>
24-
> y.shape
25-
[ 2, 2 ]
26-
> {{alias:@stdlib/ndarray/to-array}}( y )
27-
[ [ 4, 3 ], [ 2, 1 ] ]
20+
<ndarray>[ [ 4, 3 ], [ 2, 1 ] ]
2821

2922
See Also
3023
--------

base/to-reversed/docs/types/index.d.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,30 +31,23 @@ import { ndarray } from '@stdlib/types/ndarray';
3131
* @example
3232
* var typedarray = require( '@stdlib/array/typed' );
3333
* var ndarray = require( '@stdlib/ndarray/ctor' );
34-
* var ndarray2array = require( '@stdlib/ndarray/to-array' );
3534
*
3635
* var buffer = typedarray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ], 'float64' );
3736
* var shape = [ 3, 2 ];
3837
* var strides = [ 2, 1 ];
3938
* var offset = 0;
4039
*
4140
* var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' );
42-
* // returns <ndarray>
41+
* // returns <ndarray>[ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ]
4342
*
4443
* var sh = x.shape;
4544
* // returns [ 3, 2 ]
4645
*
47-
* var arr = ndarray2array( x );
48-
* // returns [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ]
49-
*
5046
* var y = toReversed( x );
51-
* // returns <ndarray>
47+
* // returns <ndarray>[ [ 6.0, 5.0 ], [ 4.0, 3.0 ], [ 2.0, 1.0 ] ]
5248
*
5349
* sh = y.shape;
5450
* // returns [ 3, 2 ]
55-
*
56-
* arr = ndarray2array( y );
57-
* // returns [ [ 6.0, 5.0 ], [ 4.0, 3.0 ], [ 2.0, 1.0 ] ]
5851
*/
5952
declare function toReversed<T extends ndarray>( x: T ): T;
6053

base/to-reversed/lib/index.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
*
2626
* @example
2727
* var ndarray = require( '@stdlib/ndarray/ctor' );
28-
* var ndarray2array = require( '@stdlib/ndarray/to-array' );
2928
* var toReversed = require( '@stdlib/ndarray/base/to-reversed' );
3029
*
3130
* var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];
@@ -34,22 +33,16 @@
3433
* var offset = 0;
3534
*
3635
* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );
37-
* // returns <ndarray>
36+
* // returns <ndarray>[ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ]
3837
*
3938
* var sh = x.shape;
4039
* // returns [ 3, 2 ]
4140
*
42-
* var arr = ndarray2array( x );
43-
* // returns [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ]
44-
*
4541
* var y = toReversed( x );
46-
* // returns <ndarray>
42+
* // returns <ndarray>[ [ 6.0, 5.0 ], [ 4.0, 3.0 ], [ 2.0, 1.0 ] ]
4743
*
4844
* sh = y.shape;
4945
* // returns [ 3, 2 ]
50-
*
51-
* arr = ndarray2array( y );
52-
* // returns [ [ 6.0, 5.0 ], [ 4.0, 3.0 ], [ 2.0, 1.0 ] ]
5346
*/
5447

5548
// MODULES //

base/to-reversed/lib/main.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,30 +35,23 @@ var assign = require( './../../../base/assign' );
3535
*
3636
* @example
3737
* var ndarray = require( '@stdlib/ndarray/ctor' );
38-
* var ndarray2array = require( '@stdlib/ndarray/to-array' );
3938
*
4039
* var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];
4140
* var shape = [ 3, 2 ];
4241
* var strides = [ 2, 1 ];
4342
* var offset = 0;
4443
*
4544
* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );
46-
* // returns <ndarray>
45+
* // returns <ndarray>[ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ]
4746
*
4847
* var sh = x.shape;
4948
* // returns [ 3, 2 ]
5049
*
51-
* var arr = ndarray2array( x );
52-
* // returns [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ]
53-
*
5450
* var y = toReversed( x );
55-
* // returns <ndarray>
51+
* // returns <ndarray>[ [ 6.0, 5.0 ], [ 4.0, 3.0 ], [ 2.0, 1.0 ] ]
5652
*
5753
* sh = y.shape;
5854
* // returns [ 3, 2 ]
59-
*
60-
* arr = ndarray2array( y );
61-
* // returns [ [ 6.0, 5.0 ], [ 4.0, 3.0 ], [ 2.0, 1.0 ] ]
6255
*/
6356
function toReversed( x ) {
6457
var out;

0 commit comments

Comments
 (0)