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) /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:64: RuntimeWarning: invalid value encountered in add two = one + one /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:65: RuntimeWarning: invalid value encountered in subtract zero = one - one /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:71: RuntimeWarning: invalid value encountered in add a = a + a /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:72: RuntimeWarning: invalid value encountered in add temp = a + one /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:73: RuntimeWarning: invalid value encountered in subtract temp1 = temp - a /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:74: RuntimeWarning: invalid value encountered in subtract if any(temp1 - one != zero): /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:74: RuntimeWarning: invalid value encountered in not_equal if any(temp1 - one != zero): /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:80: RuntimeWarning: invalid value encountered in add b = b + b /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:81: RuntimeWarning: invalid value encountered in add temp = a + b /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:82: RuntimeWarning: invalid value encountered in subtract itemp = int_conv(temp-a) /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:83: RuntimeWarning: invalid value encountered in not_equal if any(itemp != 0): /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:95: RuntimeWarning: invalid value encountered in multiply b = b * beta /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:96: RuntimeWarning: invalid value encountered in add temp = b + one /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:97: RuntimeWarning: invalid value encountered in subtract temp1 = temp - b /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:98: RuntimeWarning: invalid value encountered in subtract if any(temp1 - one != zero): /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:98: RuntimeWarning: invalid value encountered in not_equal if any(temp1 - one != zero): /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:103: RuntimeWarning: invalid value encountered in divide betah = beta / two /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:106: RuntimeWarning: invalid value encountered in add a = a + a /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:107: RuntimeWarning: invalid value encountered in add temp = a + one /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:108: RuntimeWarning: invalid value encountered in subtract temp1 = temp - a /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:109: RuntimeWarning: invalid value encountered in subtract if any(temp1 - one != zero): /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:109: RuntimeWarning: invalid value encountered in not_equal if any(temp1 - one != zero): /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:113: RuntimeWarning: invalid value encountered in add temp = a + betah /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:115: RuntimeWarning: invalid value encountered in subtract if any(temp-a != zero): /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:115: RuntimeWarning: invalid value encountered in not_equal if any(temp-a != zero): /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:117: RuntimeWarning: invalid value encountered in add tempa = a + beta /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:118: RuntimeWarning: invalid value encountered in add temp = tempa + betah /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:119: RuntimeWarning: invalid value encountered in subtract if irnd==0 and any(temp-tempa != zero): /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:119: RuntimeWarning: invalid value encountered in not_equal if irnd==0 and any(temp-tempa != zero): /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:124: RuntimeWarning: invalid value encountered in divide betain = one / beta /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:127: RuntimeWarning: invalid value encountered in multiply a = a * betain /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:130: RuntimeWarning: invalid value encountered in subtract temp = one - a /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:131: RuntimeWarning: invalid value encountered in subtract if any(temp-one != zero): /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:131: RuntimeWarning: invalid value encountered in not_equal if any(temp-one != zero): /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:133: RuntimeWarning: invalid value encountered in multiply a = a * beta /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:149: RuntimeWarning: invalid value encountered in add temp = one + a /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:150: RuntimeWarning: invalid value encountered in subtract if any(temp-one != zero): /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:150: RuntimeWarning: invalid value encountered in not_equal if any(temp-one != zero): /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:152: RuntimeWarning: invalid value encountered in multiply a = a * beta /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:160: RuntimeWarning: invalid value encountered in add temp = one + eps /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:168: RuntimeWarning: invalid value encountered in add t = one + eps /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:172: RuntimeWarning: invalid value encountered in multiply z = y*y /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:173: RuntimeWarning: invalid value encountered in multiply a = z*one # Check here for underflow /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:174: RuntimeWarning: invalid value encountered in multiply temp = z*t /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:175: RuntimeWarning: invalid value encountered in add if any(a+a == zero) or any(abs(z)>=y): /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:175: RuntimeWarning: invalid value encountered in equal if any(a+a == zero) or any(abs(z)>=y): /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:175: RuntimeWarning: invalid value encountered in absolute if any(a+a == zero) or any(abs(z)>=y): /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:175: RuntimeWarning: invalid value encountered in greater_equal if any(a+a == zero) or any(abs(z)>=y): /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:177: RuntimeWarning: invalid value encountered in multiply temp1 = temp * betain /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:178: RuntimeWarning: invalid value encountered in multiply if any(temp1*beta == z): /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:178: RuntimeWarning: invalid value encountered in equal if any(temp1*beta == z): /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:174: RuntimeWarning: underflow encountered in multiply temp = z*t /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:184: RuntimeWarning: invalid value encountered in not_equal if ibeta != 10: /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:198: RuntimeWarning: invalid value encountered in multiply y = y * betain /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:199: RuntimeWarning: invalid value encountered in multiply a = y * one /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:200: RuntimeWarning: invalid value encountered in multiply temp = y * t /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:201: RuntimeWarning: invalid value encountered in add if any(a+a != zero) and any(abs(y) < xmin): /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:201: RuntimeWarning: invalid value encountered in not_equal if any(a+a != zero) and any(abs(y) < xmin): /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:201: RuntimeWarning: invalid value encountered in absolute if any(a+a != zero) and any(abs(y) < xmin): /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:201: RuntimeWarning: invalid value encountered in less if any(a+a != zero) and any(abs(y) < xmin): /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:203: RuntimeWarning: invalid value encountered in multiply temp1 = temp * betain /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:204: RuntimeWarning: invalid value encountered in multiply if any(temp1*beta == y) and any(temp != y): /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:204: RuntimeWarning: invalid value encountered in equal if any(temp1*beta == y) and any(temp != y): /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:203: RuntimeWarning: underflow encountered in multiply temp1 = temp * betain /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:204: RuntimeWarning: invalid value encountered in not_equal if any(temp1*beta == y) and any(temp != y): /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:215: RuntimeWarning: invalid value encountered in not_equal if mx <= k + k - 3 and ibeta != 10: /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:223: RuntimeWarning: invalid value encountered in equal if ibeta == 2 and not i: /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:227: RuntimeWarning: invalid value encountered in not_equal if any(a != y): /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:229: RuntimeWarning: invalid value encountered in subtract xmax = one - epsneg /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:230: RuntimeWarning: invalid value encountered in multiply if any(xmax*one != xmax): /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:230: RuntimeWarning: invalid value encountered in not_equal if any(xmax*one != xmax): /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:232: RuntimeWarning: invalid value encountered in multiply xmax = xmax / (xmin*beta*beta*beta) /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:232: RuntimeWarning: invalid value encountered in divide xmax = xmax / (xmin*beta*beta*beta) /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:235: RuntimeWarning: invalid value encountered in equal if ibeta==2: /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:236: RuntimeWarning: invalid value encountered in add xmax = xmax + xmax /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:266: RuntimeWarning: invalid value encountered in add ten = two + two + two + two + two /usr/common/homes/g/granger/usr/local/lib/python/numpy/lib/machar.py:267: RuntimeWarning: invalid value encountered in power resolution = ten ** (-self.precision) On 10/20/06, Tim Hochberg <tim.hochberg@ieee.org> wrote:
Brian Granger wrote:
Hi,
i am running numpy on aix compiling with xlc. Revision 1.0rc2 works fine and passes all tests. But 1.0rc3 and more recent give the following on import:
Warning: invalid value encountered in multiply Warning: invalid value encountered in multiply Warning: invalid value encountered in multiply Warning: invalid value encountered in add Warning: invalid value encountered in not_equal Warning: invalid value encountered in absolute Warning: invalid value encountered in less Warning: invalid value encountered in multiply Warning: invalid value encountered in multiply Warning: invalid value encountered in equal Warning: invalid value encountered in multiply Warning: invalid value encountered in multiply Warning: invalid value encountered in multiply Warning: invalid value encountered in add Warning: invalid value encountered in not_equal Warning: invalid value encountered in absolute Warning: invalid value encountered in less Warning: invalid value encountered in multiply Warning: invalid value encountered in multiply Warning: invalid value encountered in equal Warning: invalid value encountered in multiply Warning: invalid value encountered in multiply Warning: invalid value encountered in multiply [lots more of this]
The odd thing is that all tests pass. I have looked, but can't find where this Warning is coming from in the code. Any thoughts on where this is coming from? What can I do to help debug this? I am not sure what revision introduced this issue.
The reason that you are seeing this now is that the default error state has been tightened up. There were some issues with tests failing as a result of this, but I believe I fixed those already and you're seeing this on import, not when running the tests correct? The first thing to do is figure out where the invalids are occurring, and the natural way to do that is to set the error state to raise, but you can't set the error state till you import it, so that's not going to help here.
I think the first thing that I would try is to throw in a seterr(all='raise', under='ignore') right after the call to _setdef in numeric.py. If you're lucky, this will point out where the invalids are popping up. As a sanity check, you could instead make this seterr(all='ignore'), which should make all the warnings go away, but won't tell you anything about why there are warnings to begin with.
Regards,
-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 _______________________________________________ Numpy-discussion mailing list Numpy-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/numpy-discussion
------------------------------------------------------------------------- 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