reshape(x: ivy.NativeArray, newshape: Union[int, List[int]], f: Optional[ivy.Framework] = None) → ivy.NativeArray¶
Gives a new shape to an array without changing its data.
x (array) – Tensor to be reshaped.
newshape (int or sequence of ints) – The new shape should be compatible with the original shape. One shape dimension can be -1. In this case, the value is inferred from the length of the array and remaining dimensions.
f (ml_framework, optional) – Machine learning framework. Inferred from inputs if None.