|
Re: invalid numeric result(s) in divide: msg#00039python.numeric.general
On Fri, 13 Aug 2004, Curzio Basso wrote: > >>> 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? All of the arguments to NA.where are evaluated before the function is called, so tmp/w results in divide-by-zero. The array that gets passed to NA.where contains some inf or nan (I suspect the latter based on the warning message), but you don't see them in the return value because NA.where replaces them w/ 0. Warren Focke ------------------------------------------------------- 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> |
|---|---|---|
| Previous by Date: | invalid numeric result(s) in divide: 00039, Curzio Basso |
|---|---|
| Next by Date: | Using sum() within a function: 00039, Jim Cser |
| Previous by Thread: | invalid numeric result(s) in dividei: 00039, Curzio Basso |
| Next by Thread: | Using sum() within a function: 00039, Jim Cser |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |