fun <T : Any> reshape(a: KtNDArray<T>, vararg newshape: Int, order: Order = Order.C): KtNDArray<T>
(source)
Gives a new shape to an array without changing its data.
a
- input array KtNDArray of type T.
newshape
- the new shape should be compatible with the original shape.
If an integer, then the result will be a 1-D array of that length.
One shape dimension can be -1. In this case, the value is inferred from the length of the array and remaining dimensions.
Return
view of an array containing the same data with a new shape.
See Also