klyn.math.NDArray.reshape
method
public reshape(shape as Tuple) as NDArray<T>:
Description
Reshapes the NDArray using a tuple shape.
a = NDArray<Int>.fromList([1, 2, 3, 4])
b = a.reshape((2, 2))
Parameters
  • shape Fixed-size tuple of dimensions.
Returns
A new NDArray with same data order.