Re: [Numpy-discussion] maskedarray: how to force mask to expand

2008-09-26 Thread Pierre GM
Vincent, > I think the > idea that when a.mask returns False, that actually means nomask instead > of the False I'm used to, is what caused a major part of my confusion. Indeed. > It might actually be nice to give you some context of why I asked this: > during my (satellite image) processing, I

Re: [Numpy-discussion] maskedarray: how to force mask to expand

2008-09-26 Thread Vincent Schut
Pierre, Thanks for your explanations. It still seems a little (too) complicated, but from a backwards-compatibility pov combined with your 'nomask is not False' implementation detail, I can understand mostly :-) I think the idea that when a.mask returns False, that actually means nomask instead

Re: [Numpy-discussion] maskedarray: how to force mask to expand

2008-09-25 Thread Pierre GM
Vincent, The argument of speed (having a default mask of nomask) applies only to the computations inside MaskedArray. Of course, it is still far faster not to use masks but only ndarrays. > Just for clarity, to rephrase my question: how do I force ma to give me > (always/by default/by some meth

Re: [Numpy-discussion] maskedarray: how to force mask to expand

2008-09-25 Thread Vincent Schut
Pierre GM wrote: > Vincent, > > You should really consider putting an example next time. I must admit that > I'm > not sure what you're trying to do, and where/why it fails. Pierre, sorry for that, I was posting hastily before leaving work, and was myself pretty confused about ma's behaviour

Re: [Numpy-discussion] maskedarray: how to force mask to expand

2008-09-24 Thread Pierre GM
Vincent, You should really consider putting an example next time. I must admit that I'm not sure what you're trying to do, and where/why it fails. Yes, by default, the mask of a new MaskedArray is set to the value 'nomask', which is the boolean False. Directly setting an element of the mask in

[Numpy-discussion] maskedarray: how to force mask to expand

2008-09-24 Thread Vincent Schut
Probably I'm just overlooking something obvious, but I'm having problems with maskedarrays (numpy.ma from svn: '1.3.0.dev5861'), the mask by default being a single bool value ('False') instead of a properly sized bool array. If I then try to mask one value by assigning values to certain mask po