Re: [Numpy-discussion] Concepts for masked/missing data

2011-06-26 Thread Travis Oliphant
I haven't commented yet on the mailing list because of time pressures although I have spoken to Mark as often as I can --- and have encouraged him to pursue his ideas and discuss them with the community. The Numeric Python discussion list has a long history of great dialogue to try and bring ou

Re: [Numpy-discussion] Concepts for masked/missing data

2011-06-25 Thread Wes McKinney
On Sat, Jun 25, 2011 at 3:51 PM, Nathaniel Smith wrote: > On Sat, Jun 25, 2011 at 11:32 AM, Benjamin Root wrote: >> On Sat, Jun 25, 2011 at 12:05 PM, Nathaniel Smith wrote: >>> I guess that is a difference, but I'm trying to get at something more >>> fundamental -- not just what operations are a

Re: [Numpy-discussion] Concepts for masked/missing data

2011-06-25 Thread Eric Firing
On 06/25/2011 09:09 AM, Benjamin Root wrote: > > > On Sat, Jun 25, 2011 at 1:57 PM, Nathaniel Smith > wrote: > > On Sat, Jun 25, 2011 at 11:50 AM, Eric Firing > wrote: > > On 06/25/2011 07:05 AM, Nathaniel Smith wrote: > >> On Sa

Re: [Numpy-discussion] Concepts for masked/missing data

2011-06-25 Thread Nathaniel Smith
On Sat, Jun 25, 2011 at 11:32 AM, Benjamin Root wrote: > On Sat, Jun 25, 2011 at 12:05 PM, Nathaniel Smith wrote: >> I guess that is a difference, but I'm trying to get at something more >> fundamental -- not just what operations are allowed, but what >> operations people *expect* to be allowed.

Re: [Numpy-discussion] Concepts for masked/missing data

2011-06-25 Thread Benjamin Root
On Sat, Jun 25, 2011 at 1:18 PM, Alan G Isaac wrote: > On 6/25/2011 2:06 PM, Benjamin Root wrote: > > Note that "np.sum([])" also returns 0.0. I think the > > reason why it has been returning zero instead of NaN was > > because there wasn't a NaN-equivalent for integers. > > > http://en.wikipedi

Re: [Numpy-discussion] Concepts for masked/missing data

2011-06-25 Thread Benjamin Root
On Sat, Jun 25, 2011 at 1:57 PM, Nathaniel Smith wrote: > On Sat, Jun 25, 2011 at 11:50 AM, Eric Firing wrote: > > On 06/25/2011 07:05 AM, Nathaniel Smith wrote: > >> On Sat, Jun 25, 2011 at 9:26 AM, Matthew Brett > wrote: > >>> To clarify, you're proposing for: > >>> > >>> a = np.sum(np.array(

Re: [Numpy-discussion] Concepts for masked/missing data

2011-06-25 Thread Benjamin Root
On Sat, Jun 25, 2011 at 12:17 PM, Wes McKinney wrote: > > Agree. My basic observation about numpy.ma is that it's a finely > crafted solution for a different set of problems than the ones I have. > I just don't want the same thing to happen here so I'm stuck writing > code (like I am now) that lo

Re: [Numpy-discussion] Concepts for masked/missing data

2011-06-25 Thread Nathaniel Smith
On Sat, Jun 25, 2011 at 11:50 AM, Eric Firing wrote: > On 06/25/2011 07:05 AM, Nathaniel Smith wrote: >> On Sat, Jun 25, 2011 at 9:26 AM, Matthew Brett   >> wrote: >>> To clarify, you're proposing for: >>> >>> a = np.sum(np.array([np.NA, np.NA]) >>> >>> 1) ->  np.NA >>> 2) ->  0.0 >> >> Yes -- and

Re: [Numpy-discussion] Concepts for masked/missing data

2011-06-25 Thread Eric Firing
On 06/25/2011 07:05 AM, Nathaniel Smith wrote: > On Sat, Jun 25, 2011 at 9:26 AM, Matthew Brett > wrote: >> So far I see the difference between 1) and 2) being that you cannot >> unmask. So, if you didn't even know you could unmask data, then it >> would not matter that 1) was being implemented

Re: [Numpy-discussion] Concepts for masked/missing data

2011-06-25 Thread Benjamin Root
On Sat, Jun 25, 2011 at 12:05 PM, Nathaniel Smith wrote: > On Sat, Jun 25, 2011 at 9:26 AM, Matthew Brett > wrote: > > So far I see the difference between 1) and 2) being that you cannot > > unmask. So, if you didn't even know you could unmask data, then it > > would not matter that 1) was bein

Re: [Numpy-discussion] Concepts for masked/missing data

2011-06-25 Thread Alan G Isaac
On 6/25/2011 2:06 PM, Benjamin Root wrote: > Note that "np.sum([])" also returns 0.0. I think the > reason why it has been returning zero instead of NaN was > because there wasn't a NaN-equivalent for integers. http://en.wikipedia.org/wiki/Empty_sum fwiw, Alan Isaac

Re: [Numpy-discussion] Concepts for masked/missing data

2011-06-25 Thread Benjamin Root
On Sat, Jun 25, 2011 at 11:26 AM, Matthew Brett wrote: > Hi, > > On Sat, Jun 25, 2011 at 5:05 PM, Nathaniel Smith wrote: > > So obviously there's a lot of interest in this question, but I'm > > losing track of all the different issues that've being raised in the > > 150-post thread of doom. I thi

Re: [Numpy-discussion] Concepts for masked/missing data

2011-06-25 Thread Wes McKinney
On Sat, Jun 25, 2011 at 1:05 PM, Nathaniel Smith wrote: > On Sat, Jun 25, 2011 at 9:26 AM, Matthew Brett > wrote: >> So far I see the difference between 1) and 2) being that you cannot >> unmask.  So, if you didn't even know you could unmask data, then it >> would not matter that 1) was being im

Re: [Numpy-discussion] Concepts for masked/missing data

2011-06-25 Thread Matthew Brett
Hi, On Sat, Jun 25, 2011 at 6:05 PM, Nathaniel Smith wrote: > Yes, absolutely memory and speed are important. But a really fast > solution to the wrong problem isn't so useful either :-). Would you be happy with me summarizing your idea as 1) = NA logic / API 2) = mask logic / API ? It might

Re: [Numpy-discussion] Concepts for masked/missing data

2011-06-25 Thread Nathaniel Smith
On Sat, Jun 25, 2011 at 9:26 AM, Matthew Brett wrote: > So far I see the difference between 1) and 2) being that you cannot > unmask.  So, if you didn't even know you could unmask data, then it > would not matter that 1) was being implemented by masks? I guess that is a difference, but I'm trying

Re: [Numpy-discussion] Concepts for masked/missing data

2011-06-25 Thread Charles R Harris
On Sat, Jun 25, 2011 at 10:26 AM, Matthew Brett wrote: > Hi, > > On Sat, Jun 25, 2011 at 5:05 PM, Nathaniel Smith wrote: > > So obviously there's a lot of interest in this question, but I'm > > losing track of all the different issues that've being raised in the > > 150-post thread of doom. I thi

Re: [Numpy-discussion] Concepts for masked/missing data

2011-06-25 Thread Matthew Brett
Hi, On Sat, Jun 25, 2011 at 5:05 PM, Nathaniel Smith wrote: > So obviously there's a lot of interest in this question, but I'm > losing track of all the different issues that've being raised in the > 150-post thread of doom. I think I'll find this easier if we start by > putting aside the questio

Re: [Numpy-discussion] Concepts for masked/missing data

2011-06-25 Thread Charles R Harris
On Sat, Jun 25, 2011 at 10:05 AM, Nathaniel Smith wrote: > So obviously there's a lot of interest in this question, but I'm > losing track of all the different issues that've being raised in the > 150-post thread of doom. I think I'll find this easier if we start by > putting aside the questions

[Numpy-discussion] Concepts for masked/missing data

2011-06-25 Thread Nathaniel Smith
So obviously there's a lot of interest in this question, but I'm losing track of all the different issues that've being raised in the 150-post thread of doom. I think I'll find this easier if we start by putting aside the questions about implementation and such and focus for now on the *conceptual