'Calculate the derivative of each element in the array.
Examples
>>> from sympy import ImmutableDenseNDimArray
>>> from sympy.abc import x, y
>>> M = ImmutableDenseNDimArray([[x, y], [1, x*y]])
>>> M.diff(x)
[[1, 0], [0, y]]'

def diff(self, *args):

    return type(self)(map((lambda x: x.diff(*args)), self), self.shape)
