2020-08-15 22:59:04 -0600 received badge ● Notable Question (source) 2020-06-15 16:42:12 -0600 received badge ● Popular Question (source) 2019-08-02 12:18:43 -0600 received badge ● Popular Question (source) 2018-10-08 13:43:15 -0600 received badge ● Notable Question (source) 2017-11-23 09:29:15 -0600 received badge ● Popular Question (source) 2017-11-22 05:47:36 -0600 commented answer Python's Fraction Incompatibility ? Thanks for your answer. The problem with f=Fraction(int(2), int(3)) is that now some operations are broken, for instance 1*f or f*f. On the other hand, referring to the traceback, I can't figure out why f=Fraction(2,3) causes isinstance(numerator, Rational) to be True since Rational represents an internal Python classe and numerator a Sage int. 2017-11-22 03:12:39 -0600 asked a question Python's Fraction Incompatibility ? Hi Sagemath doesn't seem to recognize Fraction from the standard module fractions : \$ sage ┌────────────────────────────────────────────────────────────────────┐ │ SageMath version 8.0, Release Date: 2017-07-21 │ │ Type "notebook()" for the browser-based notebook interface. │ │ Type "help()" for help. │ └────────────────────────────────────────────────────────────────────┘ sage: from fractions import Fraction sage: Fraction sage: Fraction(2,3) --------------------------------------------------------------------------- TypeError Traceback (most recent call last) in () ----> 1 Fraction(Integer(2),Integer(3)) /sage8.0/SageMath/local/lib/python2.7/fractions.pyc in __new__(cls, numerator, denominator) 152 isinstance(denominator, Rational)): 153 numerator, denominator = ( --> 154 numerator.numerator * denominator.denominator, 155 denominator.numerator * numerator.denominator 156 ) TypeError: unsupported operand type(s) for *: 'builtin_function_or_method' and 'builtin_function_or_method'  Any workaround ? 2016-11-16 08:26:18 -0600 commented answer Alternative to piecewise functions? f(x,a,b) and `a