'Convert SymPy\'s number to ``dtype``.'

def from_sympy(self, expr):

    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))
