|
From: Sasha <nd...@ma...> - 2006-01-17 21:33:09
|
I would like to propose to change the default value of the mask array of the ma objects from None to bool_(0). This will allow ma to take advantage of numpy scalars providing array interface. For example a check that now has to be written as "a.mask is not None and a.mask.any()" can become just a.mask.any(). Ma will still use a singleton value for an empty mask so that the code that relies on "a.mask is None" check can be changed to "a.mask is nomask". Any objections? -- sasha PS: Somewhat related: >>> from numpy import * >>> bool_(0) is bool_(0) False >>> bool(0) is bool(0) True Is there any reason not to intern numpy's bool_'s? -- sasha |