docstr: Returns a mask of the same shape as self.data, where
  mask[i,j] is True when data[i,j] corresponds to a stored element.
docstr_tok: ["Returns","a","mask","of","the","same","shape","as","self.data",",","where","mask","[","i",",","j","]","is","True","when","data","[","i",",","j","]","corresponds","to","a","stored","element","."]
code: def _data_mask(self):
      """Returns a mask of the same shape as self.data, where
      mask[i,j] is True when data[i,j] corresponds to a stored element.
      """
      num_rows, num_cols = self.shape
      offset_inds = np.arange(self.data.shape[1])
      row = offset_inds - self.offsets[:, None]
      mask = row >= 0
      mask &= row < num_rows
      mask &= offset_inds < num_cols
      return mask
  
imports: import numpy
  from ._matrix import spmatrix
  from ._base import issparse, _formats, _spbase, sparray
  from ._data import _data_matrix
  from ._sputils import isshape, upcast_char, getdtype, get_sum_dtype, validateaxis, check_shape
  from ._sparsetools import dia_matvec
label_desc: Use image node_id 3 for calling the _dia_base obj's underlying member method code with example usage: obj._data_mask() and returns: mask