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/to-reversed/README.md
+6-18Lines changed: 6 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,15 +45,12 @@ var toReversed = require( '@stdlib/ndarray/to-reversed' );
45
45
Returns a new [`ndarray`][@stdlib/ndarray/ctor] where the order of elements of an input [`ndarray`][@stdlib/ndarray/ctor] is reversed along each dimension.
46
46
47
47
```javascript
48
-
varndarray=require( '@stdlib/ndarray/ctor' );
48
+
vararray=require( '@stdlib/ndarray/array' );
49
49
var ndarray2array =require( '@stdlib/ndarray/to-array' );
50
50
51
-
var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];
52
-
var shape = [ 3, 2 ];
53
-
var strides = [ 2, 1 ];
54
-
var offset =0;
55
-
56
-
var x =ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );
51
+
var x =array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ], {
52
+
'shape': [ 3, 2 ]
53
+
});
57
54
// returns <ndarray>
58
55
59
56
var arr =ndarray2array( x );
@@ -87,23 +84,14 @@ arr = ndarray2array( y );
87
84
<!-- eslint no-undef: "error" -->
88
85
89
86
```javascript
90
-
varndarray=require( '@stdlib/ndarray/ctor' );
87
+
varuniform=require( '@stdlib/random/uniform' );
91
88
var ndarray2array =require( '@stdlib/ndarray/to-array' );
92
89
var toReversed =require( '@stdlib/ndarray/to-reversed' );
0 commit comments