'Returns a **view** of this array with a new shape without altering any data.
Parameters
shape : tuple of int
The new shape should not change the array size, namely
``np.prod(new_shape)`` should be equal to ``np.prod(self.shape)``.
One dimension can be -1. In this case, the value is inferred
from the length of the array and remaining dimensions.
0 Dimensions in shape will be copied from original shape, i.e.
if x.shape == (3, 4, 5), x.reshape((0, 20)).shape will be (3, 20).
Returns
NDArray
An array with desired shape that shares data with this array.
Examples
>>> x = mx.nd.arange(0,6).reshape((2,3))
>>> x.asnumpy()
array([[ 0.,  1.,  2.],
[ 3.,  4.,  5.]], dtype=float32)
>>> y = x.reshape((3,2))
>>> y.asnumpy()
array([[ 0.,  1.],
[ 2.,  3.],
[ 4.,  5.]], dtype=float32)
>>> y = x.reshape((3,-1))
>>> y.asnumpy()
array([[ 0.,  1.],
[ 2.,  3.],
[ 4.,  5.]], dtype=float32)
>>> y[:] = -1
>>> x.asnumpy()
array([[-1., -1., -1.],
[-1., -1., -1.]], dtype=float32)'

def reshape(self, shape):

    handle = NDArrayHandle()
    check_call(_LIB.MXNDArrayReshape(self.handle, len(shape), c_array(ctypes.c_int, shape), ctypes.byref(handle)))
    return NDArray(handle=handle, writable=self.writable)
