logo       

invalid numeric result(s) in divide: msg#00038

python.numeric.general

Subject: invalid numeric result(s) in divide


Hi all.

I have a matrix tmp a matrix w, both Float32, with

>>> tmp.shape
(3,512,512)
>>> w.shape
(512,512)
>>> w.max()
1.0
>>> w.min()
0.0
>>> NA.where(NA.and_(w > 0.0, w < 1.0e-2))
(array([]), array([]))

What is for me surprising is the following:

>>> tmp = NA.where(w > 0.0, tmp / w, 0.0)
Warning: Encountered invalid numeric result(s) in divide

Ah, both matrices have no 'nan' or 'inf' elements. So, where could the invalid result come from?

thanks, curzio


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise