2010/11/9 Jóan Petur Petersen <[email protected]>:
> I have write quite a large program, but I occationally get the following
> warning message:
>
> Warning: invalid value encountered in sqrt
>
> Can I make the program stop instead of just giving a warning, so that I get
> a traceback to where it comes from?

I think np.seterr(invalid='raise') should do the trick.

Cheers,
Scott
_______________________________________________
NumPy-Discussion mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to