[NumPy-Tickets] [NumPy] #1633: Changeset 8438 breaks ldexp on 64bit/bigendian systems
NumPy Trac
numpy-tickets@scipy....
Mon Oct 11 17:32:03 CDT 2010
#1633: Changeset 8438 breaks ldexp on 64bit/bigendian systems
--------------------+-------------------------------------------------------
Reporter: nics | Owner: somebody
Type: defect | Status: needs_review
Priority: normal | Milestone: 1.5.1
Component: Other | Version: 1.5.0
Keywords: |
--------------------+-------------------------------------------------------
Comment(by pv):
Suggested fix: http://github.com/pv/numpy/compare/master...bug/1633-ldexp-
long.diff
I don't have big-endian machines at hand, so testing is appreciated
(although it should work). Thanks!
***
The easiest solution here seemed to be to extend the ldexp definition to
the whole `long` range -- in this case we're lucky and it is easy to do.
I don't actually know what would be the easiest way to force downcast +
raise overflow error. This is not the only place where this int vs. long
annoyance has come up. Seems like this could be a useful ufunc feature
more generally.
***
I think the reason why Numpy's default integer type is `long` is that the
Python integer type is also `long`. So we probably inherited the default
from there.
--
Ticket URL: <http://projects.scipy.org/numpy/ticket/1633#comment:7>
NumPy <http://projects.scipy.org/numpy>
My example project
More information about the NumPy-Tickets
mailing list