parameters: (self, index, value)
docstring: Set item described by index. If value is masked, mask those locations.
docstring_summary: Set item described by index. If value is masked, mask those locations.
docstring_tokens: Set item described by index . If value is masked mask those locations .
function: def __setitem__(self, index, value):
          "Set item described by index. If value is masked, mask those locations."
          d = self._data
          if self is masked:
              raise MAError('Cannot alter masked elements.')
          if value is masked:
              if self._mask is nomask:
                  self._mask = make_mask_none(d.shape)
                  self._shared_mask = False
              else:
                  self.unshare_mask()
              self._mask[index] = True
              return
          m = getmask(value)
          value = filled(value).astype(d.dtype)
          d[index] = value
          if m is nomask:
              if self._mask is not nomask:
                  self.unshare_mask()
                  self._mask[index] = False
          else:
              if self._mask is nomask:
                  self._mask = make_mask_none(d.shape)
                  self._shared_mask = True
              else:
                  self.unshare_mask()
              self._mask[index] = m
function_tokens: def __setitem__ ( self , index , value ) : d = self . _data if self is masked : raise MAError ( 'Cannot alter masked elements.' ) if value is masked : if self . _mask is nomask : self . _mask = make_mask_none ( d . shape ) self . _shared_mask = False else : self . unshare_mask ( ) self . _mask [ index ] = True return m = getmask ( value ) value = filled ( value ) . astype ( d . dtype ) d [ index ] = value if m is nomask : if self . _mask is not nomask : self . unshare_mask ( ) self . _mask [ index ] = False else : if self . _mask is nomask : self . _mask = make_mask_none ( d . shape ) self . _shared_mask = True else : self . unshare_mask ( ) self . _mask [ index ] = m