original_docstring: 
      Calculate the efficiencies for a sphere when both m and x are scalars.
  
      Args:
          m: the complex index of refraction of the sphere
          x: the size parameter of the sphere
  
      Returns:
          qext: the total extinction efficiency
          qsca: the scattering efficiency
          qback: the backscatter efficiency
          g: the average cosine of the scattering phase function
      
docstring: Calculate the efficiencies for a sphere when both m and x are scalars.
docstring_tokens: Calculate the efficiencies for a sphere when both m and x are scalars .
code: def _mie_scalar(m, x):
      """
      Calculate the efficiencies for a sphere when both m and x are scalars.
  
      Args:
          m: the complex index of refraction of the sphere
          x: the size parameter of the sphere
  
      Returns:
          qext: the total extinction efficiency
          qsca: the scattering efficiency
          qback: the backscatter efficiency
          g: the average cosine of the scattering phase function
      """
      if m.real == 0 and x < 0.1:
          return _small_conducting_mie(m, x)
  
      if m.real > 0.0 and abs(m) * x < 0.1:
          return _small_mie(m, x)
  
      a, b = _mie_An_Bn(m, x)
  
      nmax = len(a)
      n = np.arange(1, nmax + 1)
      cn = 2.0 * n + 1.0
  
      qext = 2 * np.sum(cn * (a.real + b.real)) / x**2
      qsca = qext
  
      if m.imag != 0:
          qsca = 2 * np.sum(cn * (abs(a)**2 + abs(b)**2)) / x**2
  
      qback = abs(np.sum((-1)**n * cn * (a - b)))**2 / x**2
  
      c1n = n * (n + 2) / (n + 1)
      c2n = cn / n / (n + 1)
      g = 0
      for i in range(nmax - 1):
          asy1 = c1n[i] * (a[i] * a[i + 1].conjugate() +
                           b[i] * b[i + 1].conjugate()).real
          asy2 = c2n[i] * (a[i] * b[i].conjugate()).real
          g += 4 * (asy1 + asy2) / qsca / x**2
  
      return [qext, qsca, qback, g]
code_tokens: def _mie_scalar ( m , x ) : if m . real == 0 and x < 0.1 : return _small_conducting_mie ( m , x ) if m . real > 0.0 and abs ( m ) * x < 0.1 : return _small_mie ( m , x ) a , b = _mie_An_Bn ( m , x ) nmax = len ( a ) n = np . arange ( 1 , nmax + 1 ) cn = 2.0 * n + 1.0 qext = 2 * np . sum ( cn * ( a . real + b . real ) ) / x ** 2 qsca = qext if m . imag != 0 : qsca = 2 * np . sum ( cn * ( abs ( a ) ** 2 + abs ( b ) ** 2 ) ) / x ** 2 qback = abs ( np . sum ( ( - 1 ) ** n * cn * ( a - b ) ) ) ** 2 / x ** 2 c1n = n * ( n + 2 ) / ( n + 1 ) c2n = cn / n / ( n + 1 ) g = 0 for i in range ( nmax - 1 ) : asy1 = c1n [ i ] * ( a [ i ] * a [ i + 1 ] . conjugate ( ) + b [ i ] * b [ i + 1 ] . conjugate ( ) ) . real asy2 = c2n [ i ] * ( a [ i ] * b [ i ] . conjugate ( ) ) . real g += 4 * ( asy1 + asy2 ) / qsca / x ** 2 return [ qext , qsca , qback , g ]
short_docstring: Calculate the efficiencies for a sphere when both m and x are scalars.
short_docstring_tokens: Calculate the efficiencies for a sphere when both m and x are scalars .
comment: """
      Calculate the efficiencies for a sphere when both m and x are scalars.
  
      Args:
          m: the complex index of refraction of the sphere
          x: the size parameter of the sphere
  
      Returns:
          qext: the total extinction efficiency
          qsca: the scattering efficiency
          qback: the backscatter efficiency
          g: the average cosine of the scattering phase function
      """