parameters: (A, m)
return_statement: return max(value, 0)
docstring: A helper function for expm_2009.
  
      Parameters
      ----------
      A : linear operator
          A linear operator whose norm of power we care about.
      m : int
          The power of the linear operator
  
      Returns
      -------
      value : int
          A value related to a bound.
docstring_summary: A helper function for expm_2009.
docstring_tokens: A helper function for expm_2009 .
function: def _ell(A, m):
      """
      A helper function for expm_2009.
  
      Parameters
      ----------
      A : linear operator
          A linear operator whose norm of power we care about.
      m : int
          The power of the linear operator
  
      Returns
      -------
      value : int
          A value related to a bound.
  
      """
      if len(A.shape) != 2 or A.shape[0] != A.shape[1]:
          raise ValueError('expected A to be like a square matrix')
  
      p = 2*m + 1
  
      # The c_i are explained in (2.2) and (2.6) of the 2005 expm paper.
      # They are coefficients of terms of a generating function series expansion.
      choose_2p_p = scipy.special.comb(2*p, p, exact=True)
      abs_c_recip = float(choose_2p_p * math.factorial(2*p + 1))
  
      # This is explained after Eq. (1.2) of the 2009 expm paper.
      # It is the "unit roundoff" of IEEE double precision arithmetic.
      u = 2**-53
  
      # Compute the one-norm of matrix power p of abs(A).
      A_abs_onenorm = _onenorm_matrix_power_nnm(abs(A), p)
  
      # Treat zero norm as a special case.
      if not A_abs_onenorm:
          return 0
  
      alpha = A_abs_onenorm / (_onenorm(A) * abs_c_recip)
      log2_alpha_div_u = np.log2(alpha/u)
      value = int(np.ceil(log2_alpha_div_u / (2 * m)))
      return max(value, 0)
function_tokens: def _ell ( A , m ) : if len ( A . shape ) != 2 or A . shape [ 0 ] != A . shape [ 1 ] : raise ValueError ( 'expected A to be like a square matrix' ) p = 2 * m + 1 # The c_i are explained in (2.2) and (2.6) of the 2005 expm paper. # They are coefficients of terms of a generating function series expansion. choose_2p_p = scipy . special . comb ( 2 * p , p , exact = True ) abs_c_recip = float ( choose_2p_p * math . factorial ( 2 * p + 1 ) ) # This is explained after Eq. (1.2) of the 2009 expm paper. # It is the "unit roundoff" of IEEE double precision arithmetic. u = 2 ** - 53 # Compute the one-norm of matrix power p of abs(A). A_abs_onenorm = _onenorm_matrix_power_nnm ( abs ( A ) , p ) # Treat zero norm as a special case. if not A_abs_onenorm : return 0 alpha = A_abs_onenorm / ( _onenorm ( A ) * abs_c_recip ) log2_alpha_div_u = np . log2 ( alpha / u ) value = int ( np . ceil ( log2_alpha_div_u / ( 2 * m ) ) ) return max ( value , 0 )