In any case, I think it's dangerous to set numpy's global error handling
mode permanently. Is it feasible to do this on a need-to-protect basis
by wrapping just the cases where this is needed with:
npy_orig_err = npy.seterr(invalid='ignore')
try:
do_potentially_risky_stuff()
finally:
npy.seterr(npy_orig_err)
Users might have code, for example, where ignoring this error will lead
to bad consequences (including hard-to-find bugs).
-Andrew
Eric Firing wrote:
> [EMAIL PROTECTED] wrote:
>> Revision: 4325
>> http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4325&view=rev
>> Author: dsdale
>> Date: 2007-11-15 13:23:27 -0800 (Thu, 15 Nov 2007)
>>
>> Log Message:
>> -----------
>> added npy.seterr(invalid='ignore') to beginning of axes.py, to silence
>> repeated warnings created by finding extrema of arrays containing nans
>> (discovered during calls to errorbar)
>
> Darren,
>
> Is this hiding a problem that will pop up farther down the line? I
> think the strategy so far has been that inputs to plotting functions
> should use masked arrays, not nans, and correspondingly, the plotting
> functions should handle masked arrays gracefully. Although nans are
> used at some internal stages, I don't think they are handled correctly
> from end to end. We could add nan checks at the early argument
> processing stage, but it would slow things down a bit.
>
> Eric
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Matplotlib-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel