Ticket #3564: sage-3564.patch
| File sage-3564.patch, 1.6 kB (added by was, 5 months ago) |
|---|
-
a/sage/calculus/calculus.py
old new 289 289 290 290 import sage.ext.fast_eval as fast_float 291 291 292 #needed for converting from SymPy to SAGE293 import sympy294 295 292 # TODO: What the heck does this is_simplified thing do? 296 293 is_simplified = False 297 294 … … 465 462 elif isinstance(x, MaximaElement): 466 463 return symbolic_expression_from_maxima_element(x) 467 464 # if "x" is a SymPy object, convert it to a SAGE object 468 elif isinstance(x, sympy.Basic):469 return self(x._sage_())470 465 elif is_Polynomial(x) or is_MPolynomial(x): 471 466 if x.base_ring() != self: # would want coercion to go the other way 472 467 return SymbolicPolynomial(x) … … 494 489 return SymbolicConstant(x) 495 490 elif isinstance(x, complex): 496 491 return evaled_symbolic_expression_from_maxima_string('%s+%%i*%s'%(x.real,x.imag)) 492 493 from sympy.core.basic import Basic 494 if isinstance(x, Basic): 495 return self(x._sage_()) 497 496 else: 498 497 raise TypeError, "cannot coerce type '%s' into a SymbolicExpression."%type(x) 499 498