Skip to main content
`Ctrl`+`K`
scipy.sparse.dia_matrix.

# power

dia_matrix.power(n, dtype=None)

  This function performs element-wise power.

  Parameters:
    n scalar

      n is a non-zero scalar (nonzero avoids dense ones creation) If zero power is desired, special case it to use np.ones

    dtype If dtype is not specified, the current dtype will be preserved.
  Raises:
    NotImplementedError if n is a zero scalar

      If zero power is desired, special case it to use `np.ones(A.shape, dtype=A.dtype)`