Re: [Numpy-discussion] How do I make numpy raise exceptions instead of print warnings?
March 31, 2008
5:59 a.m.
Thank you, Robert! numpy.seterr() is very helpful. It is just what I needed. numpy.seterr(all = 'raise') forces numpy to raise exceptions instead of printing warnings. [begin quote] numpy.seterr(all = None, divide = None, over = None, under = None, invalid = None) Valid values for each type of error are the strings "ignore", "warn", "raise", and "call". [end quote] Date: Sat, 29 Mar 2008 17:05:42 -0500 From: "Robert Kern" <robert.kern@gmail.com> On Sat, Mar 29, 2008 at 4:25 PM, Roy H. Han <rhh2109@columbia.edu> wrote:
Is there a way to have numpy raise exceptions instead of printing warnings? The printed warnings make debugging hard.
numpy.seterr() Read the docstring for the various options. -- Robert Kern
6590
Age (days ago)
6590
Last active (days ago)
0 comments
1 participants
participants (1)
-
Roy H. Han