class_docstr: Sparse matrix with DIAgonal storage
  
  This can be instantiated in several ways:
      dia_matrix(D)
          with a dense matrix
  
      dia_matrix(S)
          with another sparse matrix S (equivalent to S.todia())
  
      dia_matrix((M, N), [dtype])
          to construct an empty matrix with shape (M, N),
          dtype is optional, defaulting to dtype='d'.
  
      dia_matrix((data, offsets), shape=(M, N))
          where the ``data[k,:]`` stores the diagonal entries for
          diagonal ``offsets[k]`` (See example below)
  
  Attributes
  ----------
  dtype : dtype
      Data type of the matrix
  shape : 2-tuple
      Shape of the matrix
  ndim : int
      Number of dimensions (this is always 2)
  nnz
      Number of nonzero elements
  data
      DIA format data array of the matrix
  offsets
      DIA format offset array of the matrix
  
  Notes
  -----
  
  Sparse matrices can be used in arithmetic operations: they support
  addition, subtraction, multiplication, division, and matrix power.
  
  Examples
  --------
  
  >>> import numpy as np
  >>> from scipy.sparse import dia_matrix
  >>> dia_matrix((3, 4), dtype=np.int8).toarray()
  array([[0, 0, 0, 0],
         [0, 0, 0, 0],
         [0, 0, 0, 0]], dtype=int8)
  
  >>> data = np.array([[1, 2, 3, 4]]).repeat(3, axis=0)
  >>> offsets = np.array([0, -1, 2])
  >>> dia_matrix((data, offsets), shape=(4, 4)).toarray()
  array([[1, 0, 3, 0],
         [1, 2, 0, 4],
         [0, 2, 3, 0],
         [0, 0, 3, 4]])
code: def __repr__(self):
      format = _formats[self.getformat()][1]
      return (
          "<%dx%d sparse matrix of type '%s'\n"
          "\twith %d stored elements (%d diagonals) in %s format>"
          % (
              self.shape
              + (self.dtype.type, self.nnz, self.data.shape[0], format)
          )
      )
  
imports: from __future__ import division, print_function, absolute_import
  import numpy
  from .base import isspmatrix, _formats, spmatrix
  from .data import _data_matrix
  from .sputils import isshape, upcast_char, getdtype, get_index_dtype, get_sum_dtype, validateaxis, check_shape, matrix
  from ._sparsetools import dia_matvec
label_desc: Use image node_id 2 for calling the dia_matrix obj's underlying member method code with example usage: obj.__repr__() and returns: unknown