[Numpy-discussion] verbosity control for warnings
perry at stsci.edu
Wed Mar 29 06:01:10 CST 2006
On Mar 29, 2006, at 4:50 AM, Benjamin Georgi wrote:
> my application frequently requires to take logarithms of zero, i.e.
>>>> import numarray
> Warning: Encountered divide by zero(s) in log
> Now, while the result of -inf works just fine, any direct application
> of numarray.log produces tons of warnings. Right now I'm masking the
> input arrays to avoid the warnings, which is rather inefficient.
> So, the question is whether there is some kind of verbosity control I
> could use to deactivate these warnings. If there is no such
> functionality, I would like to suggest looking into the build-in
> Python logging package for that purpose.
Yes, look at section 6.2 of the numarray manual.
More information about the Numpy-discussion