[Numpy-discussion] Unexpected warnings in where
Álvaro Tejero Cantero
alvaro at antalia.com
Thu May 13 04:50:01 CDT 2004
Hi,
I cannot understand why I do receive these warnings:
Warning: Encountered invalid numeric result(s) in sqrt
Warning: Encountered invalid numeric result(s) in divide
after
>>> newtimes = where(logical_and(RV<0,discr>0), (-RV-sqrt(discr))/VV, far_future)
RV, discr, RR, VV are NxN arrays of reals (Float64), while
far_future=1e20 (scalar).
1. sqrt(<0) should be impossible, since it's explicitly ruled out that
discr<0 in the where condition.
2. /0 should also be impossible, since VV==0 is True only for the
diagonal...
I've done some testing and where(logical_and(RV<0, discr>0), discr, 666)
doesn't show any negative numbers, neither does
where(logical_and(RV<0,discr>0),VV,666) show any zeroes...
Please.. what am I doing wrong here?
--
Álvaro Tejero Cantero
http://alqua.org -- documentos libres
free documents
More information about the Numpy-discussion
mailing list