docstr: 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)`
docstr_tok: ["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",")","`"]
code: def power(self, 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)`
      """
      if not isscalarlike(n):
          raise NotImplementedError("input is not scalar")
      if not n:
          raise NotImplementedError(
              "zero power is not supported as it would densify the matrix.\n"
              "Use `np.ones(A.shape, dtype=A.dtype)` for this case."
          )
  
      data = self._deduped_data()
      if dtype is not None:
          data = data.astype(dtype)
      return self._with_data(data**n)
  
imports: import numpy
  from ._base import _spbase, _ufuncs_with_fixed_point_at_zero
  from ._sputils import isscalarlike, validateaxis
label_desc: Use image node_id 16 for calling the _data_matrix obj's underlying member method code with example usage: obj.power(n, dtype) and returns: self