[Numpy-discussion] Question about masked arrays
Pierre GM
pgmdevlist@gmail....
Mon Sep 20 16:17:57 CDT 2010
On Sep 20, 2010, at 11:09 PM, Benjamin Root wrote:
>
> And also if the inner execution could be clarified by asanyarray assertion why there is ma equivalent array operation functions?
>
> That is a design question for the numpy gods...
Well, asanyarray is not always a panacea, and can lead to problems with other subclasses of ndarray. I'd think twice before bluntly adapting a function to use np.asanyarray... Better explicit than implicit.
A relatively simple way to take care of the issue is to improve the documentation, for example by adding a note pointing ti the corresponding np.ma function.
> I wonder if the functions were originally intended to work with masked arrays, but at some point, some inner part of the algorithm became 'ma-unfriendly'...
I don't think so. Anyway, as usual, please open a ticket when you run into a problem with masked arrays and I'll try to take care of it ASAP.
More information about the NumPy-Discussion
mailing list