Problem introduced after 1.0rc2 on AIX with xlc

Tim Hochberg tim.hochberg at ieee.org
Sat Oct 21 00:13:07 EDT 2006


Brian Granger wrote:
> When I set seterr(all='warn') I see the following:
>
> In [1]: import numpy
> /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/ufunclike.py:46:
> RuntimeWarning: invalid value encountered in log
>   _log2 = umath.log(2)
> /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/scimath.py:19:
> RuntimeWarning: invalid value encountered in log
>   _ln2 = nx.log(2.0)
>   
[etc, etc]

Wow! That looks pretty bad. What do you get if you try just 
"numpy.log(2)" or "numpy.log(2.0)"? Is it producing sane results for 
scalars at all? I suppose another possibility is that the error 
reporting is broken on AIX for some reason.

Hmmm.

I'm betting that is is. The macro UFUNC_CHECK_STATUS is very platform 
dependent. There is a version from AIX (ufuncobject.h line 301), but 
perhaps it's broken on your particular configuration and as a result is 
spitting out all kinds of bogus errors. This is only coming to light now 
because the default error checking level got cranked up.

I gotta call it a night and I'll be out tomorrow, so I won't be much 
more help, but here's something that you might look into: have you 
compiled numarray sucessfully? If you haven't you might want to try it.  
It uses the same default error checking that numpy is now using. If you 
have, you might want to look for the equivalent of UFUNC_CHECK_STATUS 
(it might even have the same name) and splice it into numpy and see if 
it fixes your problems.

Of course, if numpy.log(2) is spitting out something bogus, there's 
something much worse going on, but I suspect you would have noticed that 
by now.

Good luck,

-tim


-------------------------------------------------------------------------
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




More information about the NumPy-Discussion mailing list