class_docstr: Complex numbers up to the given precision. 
class_docstr_tok: ["Complex","numbers","up","to","the","given","precision","."]
docstr: Convert SymPy's number to ``dtype``. 
docstr_tok: ["Convert","SymPy","'s","number","to","``","dtype","``","."]
code: def from_sympy(self, expr):
      """Convert SymPy's number to ``dtype``."""
      number = expr.evalf(n=self.dps)
      real, imag = number.as_real_imag()
  
      if real.is_Number and imag.is_Number:
          return self.dtype(real, imag)
      else:
          raise CoercionFailed("expected complex number, got %s" % expr)
  
imports: from sympy.external.gmpy import SYMPY_INTS
  from sympy.core.numbers import Float, I
  from sympy.polys.domains.characteristiczero import CharacteristicZero
  from sympy.polys.domains.field import Field
  from sympy.polys.domains.gaussiandomains import QQ_I
  from sympy.polys.domains.mpelements import MPContext
  from sympy.polys.domains.simpledomain import SimpleDomain
  from sympy.polys.polyerrors import DomainError, CoercionFailed
  from sympy.utilities import public
label_desc: Use image node_id 11 for calling the ComplexField obj's underlying member method code with example usage: obj.from_sympy(expr) and returns: self