I am using numpy-0.9.8 and it seems that numpy's log2 function can't
handle large integers?

In [19]: 
a=11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111

In [20]: math.log(a,2)
Out[20]: 292.48167544353294

In [21]: numpy.log2(a)
---------------------------------------------------------------------------
exceptions.AttributeError                            Traceback (most
recent call last)

/home/david/<ipython console>

/usr/lib/python2.4/site-packages/numpy/lib/ufunclike.py in log2(x, y)
     52     x = asarray(x)
     53     if y is None:
---> 54         y = umath.log(x)
     55     else:
     56         umath.log(x, y)

AttributeError: 'long' object has no attribute 'log'

Does anyone else get this in numpy? if not, what version are you using?

-- 
David Grant
http://www.davidgrant.ca

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion

Reply via email to