Updates:
Summary: Fix as_numer_denom() docstring and add Expr to the Sphinx docs
Labels: Documentation
Comment #1 on issue 1945 by asmeurer: Fix as_numer_denom() docstring and
add Expr to the Sphinx docs
http://code.google.com/p/sympy/issues/detail?id=1945
This is what it looks like in the code where it now lives in expr.py:
""" a/b -> a,b
The following is a possible way to modify Eq which are now
just returned as (Eq(), 1). It is not a trivial change,
however, and it causes many failures.
from sympy.core.relational import Equality
from sympy import Eq
if isinstance(self, Equality):
l = Symbol('l', dummy=True)
r = Symbol('r', dummy=True)
n, d = (l*self.lhs - r*self.rhs).as_numer_denom()
return Eq(n.subs({l: 1, r: 0}),
n.subs({l: 0, r: -1})), d.subs({l: 1, r: 1})
"""
What is all that about Eq()? It belongs in a comment somewhere, not in the
docstring. The real docstring should
explain what the function does and have doctests.
By the way, I built the docs in master and noticed that no one ever added
Expr to the Sphinx docs.
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to sympy-iss...@googlegroups.com.
To unsubscribe from this group, send email to
sympy-issues+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en.