[Numpy-discussion] How do I make numpy raise exceptions instead of print warnings?
Roy H. Han
Mon Mar 31 00:59:35 CDT 2008
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.
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".
Date: Sat, 29 Mar 2008 17:05:42 -0500
From: "Robert Kern" <firstname.lastname@example.org>
On Sat, Mar 29, 2008 at 4:25 PM, Roy H. Han <email@example.com> wrote:
> Is there a way to have numpy raise exceptions instead of printing
> warnings? The printed warnings make debugging hard.
Read the docstring for the various options.
More information about the Numpy-discussion