Comment #1 on issue 3086 by smi...@gmail.com: round() function overrides
built-in
http://code.google.com/p/sympy/issues/detail?id=3086
Unlike __int__ there is not way to keep the same name for round, so I made
it to default quickly to python's built-in. The time difference is < 3%. Is
this significant enough to warrant having to use a different name?
from sympy.functions.elementary.miscellaneous import _pyround
from timeit import timeit
timeit('_pyround(randint(1,1000000))','from
sympy.functions.elementary.misc
llaneous import _pyround\nfrom random import randint')
2.8012628194217446
timeit('round(randint(1,1000000))','from
sympy.functions.elementary.miscell
neous import _pyround\nfrom random import randint')
2.8702862158276918
(If the name change is deemed necessary, I would prefer a non-caps name
like `rounded` since, unlike Abs, it isn't a class.)
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to sympy-issues@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.