[Numpy-discussion] Are masked arrays slower for processing than ndarrays?
Wed May 13 18:36:30 CDT 2009
> Here's the catch: it's basically cheating. I got rid of the pre-
> processing (where a mask was calculated depending on the domain and
> the input set to a filling value depending on this mask, before the
> actual computation). Instead, I force
> np.seterr(divide='ignore',invalid='ignore') before calling the ufunc
This isn't a thread safe approach and could cause wierd side effects in a
multi-threaded application. I think modifying global options/variables inside
any function where it generally wouldn't be expected by the user is a bad idea.
More information about the Numpy-discussion