This is documented in the online docs [1] and in the docstring. If you're using ipython, you can use their introspection to check the docstring, for example, as '?Rational'. From the docstring:
**Low-level** Access numerator and denominator as .p and .q: >>> r = Rational(3,4) >>> r 3/4 >>> r.p 3 >>> r.q 4 [1] http://docs.sympy.org/0.7.1/index.html Sean On Wed, Feb 29, 2012 at 00:48, Gaurav Sathe <[email protected]>wrote: > If 'f' is a fraction, can someone please tell me how to separate the > numerator and denominator of f???? I tried f.numerator and f.denominator > but it doesnt seem to work... > > -- > You received this message because you are subscribed to the Google Groups > "sympy" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/sympy/-/kvXX5VvGsTAJ. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/sympy?hl=en. > -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
