#NEWLINE# def __setitem__( self , index , value ) : #NEWLINE# #INDENT# 'Allows to set items to MutableDenseNDimArray.\n\n        Examples\n        ========\n\n        >>> from sympy.tensor.array import MutableSparseNDimArray\n        >>> a = MutableSparseNDimArray.zeros(2, 2)\n        >>> a[0, 0] = 1\n        >>> a[1, 1] = 1\n        >>> a\n        [[1, 0], [0, 1]]\n\n\n        ' #NEWLINE# index = self . _parse_index ( index ) #NEWLINE# if ( not isinstance ( value , MutableNDimArray ) ) : #NEWLINE# #INDENT# value = _sympify ( value ) #NEWLINE# #UNINDENT# if isinstance ( value , NDimArray ) : #NEWLINE# #INDENT# return NotImplementedError #NEWLINE# #UNINDENT# if ( ( value == 0 ) and ( index in self . _sparse_array ) ) : #NEWLINE# #INDENT# self . _sparse_array . pop ( index ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . _sparse_array [ index ] = value