'Returns MutableDenseNDimArray instance with new shape. Elements number
must be        suitable to new shape. The only argument of method sets
new shape.
Examples
>>> from sympy import MutableDenseNDimArray
>>> a = MutableDenseNDimArray([1, 2, 3, 4, 5, 6], (2, 3))
>>> a.shape
(2, 3)
>>> a
[[1, 2, 3], [4, 5, 6]]
>>> b = a.reshape(3, 2)
>>> b.shape
(3, 2)
>>> b
[[1, 2], [3, 4], [5, 6]]'

def reshape(self, *newshape):

    new_total_size = functools.reduce((lambda x, y: (x * y)), newshape)
    if (new_total_size != self._loop_size):
        raise ValueError(('Invalid    reshape    parameters    ' + newshape))
    return type(self)(self._array, newshape)
