larray.Array.reshape_like
- Array.reshape_like(target) Array [source]
Same as reshape but with an array as input. Total size (= number of stored data) of the two arrays must be equal.
See also
reshape
returns an Array with a new shape given a list of axes.
Examples
>>> arr = zeros((2, 2, 2), dtype=int) >>> arr {0}* {1}*\{2}* 0 1 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 0 >>> new_arr = arr.reshape_like(ndtest((2, 4))) >>> new_arr a\b b0 b1 b2 b3 a0 0 0 0 0 a1 0 0 0 0