[Yt-dev] Numpy warning supression

Stephen Skory s at skory.us
Mon Aug 15 12:11:53 PDT 2011


Hi all,

this may not be a big issue because most people won't be using
Geoffrey's new ellipsoidal halo information. However, it may spark
discussion about this topic overall and set a useful precedent.

I have just finished vectorizing some of Geoffrey's code that is
attached to the halo finder code. In so doing, I am allowing NaNs to
come into the calculation because it keeps thing simple. Happily, the
NaNs only exist where I know the answers can't be, and
numpy.nanargmin/max() happily ignores the NaNs. But when I make the
NaNs through a divide by zero (and some other stuff) I get warning
messages telling me I just did what I knew was going to happen.

My question is, do we think that I should try to suppress these
warnings? They are accurate, but the math that makes them is done
intentionally, so they're not informative.

Can I get a +1/0/-1? Thanks!

-- 
Stephen Skory
s at skory.us
http://stephenskory.com/
510.621.3687 (google voice)



More information about the yt-dev mailing list