Re: [Numpy-discussion] Missing/accumulating data

2011-07-05 Thread Christopher Barker
Mark Wiebe wrote: > Speaking of which, would we make the NA value be false? > > For booleans, it works out like this: > > http://en.wikipedia.org/wiki/Ternary_logic#Kleene_logic That's pretty cool! > In R, trying to test the truth value of NA ("if (NA) ...") raises an > exception. Adopting

Re: [Numpy-discussion] Missing/accumulating data

2011-07-05 Thread Mark Wiebe
On Tue, Jul 5, 2011 at 11:45 AM, Benjamin Root wrote: > > On Tue, Jul 5, 2011 at 11:34 AM, Chris Barker wrote: > >> >> Speaking of which, would we make the NA value be false? >> >> > The NEP currently states that accessing np.NA as a boolean will act as an > error. However, logical_and([NA, Fals

Re: [Numpy-discussion] Missing/accumulating data

2011-07-05 Thread Benjamin Root
On Tue, Jul 5, 2011 at 11:34 AM, Chris Barker wrote: > > Speaking of which, would we make the NA value be false? > > The NEP currently states that accessing np.NA as a boolean will act as an error. However, logical_and([NA, False]) == False and logical_or([NA, True]) will be special-cased. This

Re: [Numpy-discussion] Missing/accumulating data

2011-07-05 Thread Mark Wiebe
On Tue, Jul 5, 2011 at 11:34 AM, Chris Barker wrote: > On 7/3/11 9:03 PM, Joe Harrington wrote: > > Christopher Barker, Ph.D. wrote > >> quick note on this: I like the "FALSE == good" way, because: > > > > So, you like to have multiple different kinds of masked, but I need > > multiple good value

Re: [Numpy-discussion] Missing/accumulating data

2011-07-05 Thread Chris Barker
On 7/3/11 9:03 PM, Joe Harrington wrote: > Christopher Barker, Ph.D. wrote >> quick note on this: I like the "FALSE == good" way, because: > > So, you like to have multiple different kinds of masked, but I need > multiple good values for counts. fair enough, maybe there isn't a consensus about wha

Re: [Numpy-discussion] Missing/accumulating data

2011-07-03 Thread Joe Harrington
Christopher Barker, Ph.D. wrote > quick note on this: I like the "FALSE == good" way, because: So, you like to have multiple different kinds of masked, but I need multiple good values for counts. We could do it with negative masks and positive counts, but that doesn't reduce to a boolean for whoe

Re: [Numpy-discussion] Missing/accumulating data

2011-07-01 Thread Mark Wiebe
On Fri, Jul 1, 2011 at 2:29 PM, Joe Harrington wrote: > Mark Wiebe : > > > With a non-boolean alpha mask, there's an implication of a > > multiplication operator in there somewhere, but with a boolean mask, > > the data can be any data whatsoever that doesn't necessarily support > > any kind of b

Re: [Numpy-discussion] Missing/accumulating data

2011-07-01 Thread Charles R Harris
On Fri, Jul 1, 2011 at 3:07 PM, Eric Firing wrote: > On 07/01/2011 10:27 AM, Charles R Harris wrote: > > > > > > On Fri, Jul 1, 2011 at 1:39 PM, Christopher Barker > > mailto:chris.bar...@noaa.gov>> wrote: > > > > Joe Harrington wrote: > > > All > > > that has to happen is to allow

Re: [Numpy-discussion] Missing/accumulating data

2011-07-01 Thread Eric Firing
On 07/01/2011 10:27 AM, Charles R Harris wrote: > > > On Fri, Jul 1, 2011 at 1:39 PM, Christopher Barker > mailto:chris.bar...@noaa.gov>> wrote: > > Joe Harrington wrote: > > All > > that has to happen is to allow the sense of the mask to be FALSE > = the > > data are bad, T

Re: [Numpy-discussion] Missing/accumulating data

2011-07-01 Thread Charles R Harris
On Fri, Jul 1, 2011 at 1:39 PM, Christopher Barker wrote: > Joe Harrington wrote: > > All > > that has to happen is to allow the sense of the mask to be FALSE = the > > data are bad, TRUE = the data are good, and allow (not require) the > > mask to be of any numerical type, or at least of integer

Re: [Numpy-discussion] Missing/accumulating data

2011-07-01 Thread Christopher Barker
Joe Harrington wrote: > All > that has to happen is to allow the sense of the mask to be FALSE = the > data are bad, TRUE = the data are good, and allow (not require) the > mask to be of any numerical type, or at least of integer type as well > as boolean. quick note on this: I like the "FALSE =

Re: [Numpy-discussion] Missing/accumulating data

2011-07-01 Thread Joe Harrington
Mark Wiebe : > With a non-boolean alpha mask, there's an implication of a > multiplication operator in there somewhere, but with a boolean mask, > the data can be any data whatsoever that doesn't necessarily support > any kind of blending operations. My goal in raising the point is to find a comm

Re: [Numpy-discussion] Missing/accumulating data

2011-06-29 Thread Mark Wiebe
Yeah, it takes a long time to wade through and respond to everything. I think the "missing data" problem and weighted masking are closely related, but neither one is fully a subset of the other. With a non-boolean alpha mask, there's an implication of a multiplication operator in there somewhere,

Re: [Numpy-discussion] Missing/accumulating data

2011-06-28 Thread Charles R Harris
On Tue, Jun 28, 2011 at 10:50 AM, Joe Harrington wrote: > As with Travis, I have not had time to wade through the 150+ messages > on masked arrays, but I'd like to raise a concept I've mentioned in > the past that would enable a broader use if done slightly differently. > That is, the "masked arr

[Numpy-discussion] Missing/accumulating data

2011-06-28 Thread Joe Harrington
As with Travis, I have not had time to wade through the 150+ messages on masked arrays, but I'd like to raise a concept I've mentioned in the past that would enable a broader use if done slightly differently. That is, the "masked array" problem is a subset of this more-general problem. Please resp