Sage sgn to Sympy sign

19 views
Skip to first unread message

CDSousa

unread,
Oct 13, 2011, 12:30:32 PM10/13/11
to sage-support
Hi,

Sage uses a dictionary to translate Sage function names to SymPy ones
when they are different.
Signal function is called "sgn" in Sage and "sign" in Sympy but the
respective translation is not in the dictionary, and a error is issued
if one tries to do something like:
x = var('x'); sgn(x)._sympy_()

To fix it, it is just a matter of adding
"sgn": "sign",
to the dictionary.

Such dictionary is called "translation_table" and it is inside
function "composition" from class "SympyConverter" of file "sage/
symbolic/expression_conversions.py".

I would like to know how can I submit a patch, or ask someone to do
it, and if it is necessary to include something in a unit test (like I
did for Sympy for the inverse translation).
?

Robert Bradshaw

unread,
Oct 14, 2011, 2:30:22 AM10/14/11
to sage-s...@googlegroups.com
We'd welcome a patch. How to do so is written up in detail at
http://www.sagemath.org/doc/developer/walk_through.html#creating-a-change
. Essentially, you create the change, uploaded it to trac, someone
referees it, and then it gets merged into the next release.

> --
> To post to this group, send email to sage-s...@googlegroups.com
> To unsubscribe from this group, send email to sage-support...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/sage-support
> URL: http://www.sagemath.org
>

kcrisman

unread,
Oct 14, 2011, 8:38:21 AM10/14/11
to sage-support


On Oct 14, 2:30 am, Robert Bradshaw <rober...@math.washington.edu>
wrote:
> We'd welcome a patch. How to do so is written up in detail athttp://www.sagemath.org/doc/developer/walk_through.html#creating-a-ch...
> . Essentially, you create the change, uploaded it to trac, someone
> referees it, and then it gets merged into the next release.

And I've just created a ticket for this - http://trac.sagemath.org/sage_trac/ticket/11921.
You will still need to get a Trac account to upload the patch, but
this at least gets the ball rolling. That's a good catch, thanks!

- kcrisman
Reply all
Reply to author
Forward
0 new messages