[Numpy-discussion] numpy log2 has bug

josef.pktd@gmai... josef.pktd@gmai...
Wed Mar 23 13:51:49 CDT 2011


2011/3/23 Dmitrey <tmp50@ukr.net>:
>>>> from numpy import log2, __version__
>>>>
>>>> log2(2**63)
> Traceback (most recent call
> last):
>   File "<stdin>", line 1, in
> <module>
> AttributeError: log2
>>>> __version__
> '2.0.0.dev-1fe8136'
> (doesn't work with 1.3.0 as well)

>>> np.array([2**63])
array([9223372036854775808], dtype=object)

>>> log2(2.**63)
62.999999999999993
>>> log2(2**63)
Traceback (most recent call last):
  File "<pyshell#9>", line 1, in <module>
    log2(2**63)
AttributeError: log2

integer conversion problem

Josef


>
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
>


More information about the NumPy-Discussion mailing list