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

# power

lil_matrix.power(n, dtype=None)

  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 `numpy.ones`

    dtype dtype, optional

      If dtype is not specified, the current dtype will be preserved.

  Returns:
    csr array/matrix

      Result of raising all elements to the power n.