forked from stdlib-js/stdlib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrepl.txt
35 lines (26 loc) · 813 Bytes
/
repl.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{{alias}}( x, fromShape, toShape, colexicographic )
Reshapes a nested array into another nested array having a desired shape.
Parameters
----------
x: Array
Input n-dimensional nested array.
fromShape: Array<integer>
Input array shape.
toShape: Array<integer>
Output array shape.
colexicographic: boolean
Specifies whether to reshape the array in colexicographic order.
Returns
-------
out: Array
Output array.
Examples
--------
> var x = [ [ 1, 2 ], [ 3, 4 ] ];
> var out = {{alias}}( x, [ 2, 2 ], [ 4, 1 ], false )
[ [ 1 ], [ 2 ], [ 3 ], [ 4 ] ]
> var x = [ [ 1, 2 ], [ 3, 4 ] ];
> var out = {{alias}}( x, [ 2, 2 ], [ 4, 1 ], true )
[ [ 1 ], [ 3 ], [ 2 ], [ 4 ] ]
See Also
--------