Re: [Numpy-discussion] Masking through generator arrays

2012-05-10 Thread Dag Sverre Seljebotn
On 05/10/2012 06:18 AM, Charles R Harris wrote: On Wed, May 9, 2012 at 9:54 PM, Dag Sverre Seljebotn d.s.seljeb...@astro.uio.no mailto:d.s.seljeb...@astro.uio.no wrote: Sorry everyone for being so dense and contaminating that other thread. Here's a new thread where I can respond to

Re: [Numpy-discussion] Missing data wrap-up and request for comments

2012-05-10 Thread Gael Varoquaux
On Wed, May 09, 2012 at 02:35:26PM -0500, Travis Oliphant wrote:   Basically it buys not forcing *all* NumPy users (on the C-API level) to now deal with a masked array.    I know this push is a feature that is part of Mark's intention (as it pushes downstream libraries to think about

Re: [Numpy-discussion] Missing data wrap-up and request for comments

2012-05-10 Thread Scott Sinclair
On 9 May 2012 18:46, Travis Oliphant tra...@continuum.io wrote: The document is available here:    https://github.com/numpy/numpy.scipy.org/blob/master/NA-overview.rst This is orthogonal to the discussion, but I'm curious as to why this discussion document has landed in the website repo? I

Re: [Numpy-discussion] Masking through generator arrays

2012-05-10 Thread Charles R Harris
On Thu, May 10, 2012 at 1:10 AM, Dag Sverre Seljebotn d.s.seljeb...@astro.uio.no wrote: On 05/10/2012 06:18 AM, Charles R Harris wrote: On Wed, May 9, 2012 at 9:54 PM, Dag Sverre Seljebotn d.s.seljeb...@astro.uio.no mailto:d.s.seljeb...@astro.uio.no wrote: Sorry everyone for

Re: [Numpy-discussion] Missing data wrap-up and request for comments

2012-05-10 Thread Dag Sverre Seljebotn
On 05/10/2012 06:05 AM, Dag Sverre Seljebotn wrote: On 05/10/2012 01:01 AM, Matthew Brett wrote: Hi, On Wed, May 9, 2012 at 12:44 PM, Dag Sverre Seljebotn d.s.seljeb...@astro.uio.no wrote: On 05/09/2012 06:46 PM, Travis Oliphant wrote: Hey all, Nathaniel and Mark have worked very hard

Re: [Numpy-discussion] Masking through generator arrays

2012-05-10 Thread Dag Sverre Seljebotn
On 05/10/2012 10:40 AM, Charles R Harris wrote: On Thu, May 10, 2012 at 1:10 AM, Dag Sverre Seljebotn d.s.seljeb...@astro.uio.no mailto:d.s.seljeb...@astro.uio.no wrote: On 05/10/2012 06:18 AM, Charles R Harris wrote: On Wed, May 9, 2012 at 9:54 PM, Dag Sverre

Re: [Numpy-discussion] Missing data wrap-up and request for comments

2012-05-10 Thread Nathaniel Smith
Hi Matthew, On Thu, May 10, 2012 at 12:01 AM, Matthew Brett matthew.br...@gmail.com wrote: The third proposal is certainly the best one from Cython's perspective; and I imagine for those writing C extensions against the C API too. Having PyType_Check fail for ndmasked is a very good way of

Re: [Numpy-discussion] Masking through generator arrays

2012-05-10 Thread Dag Sverre Seljebotn
On 05/10/2012 11:38 AM, Dag Sverre Seljebotn wrote: On 05/10/2012 10:40 AM, Charles R Harris wrote: On Thu, May 10, 2012 at 1:10 AM, Dag Sverre Seljebotn d.s.seljeb...@astro.uio.nomailto:d.s.seljeb...@astro.uio.no wrote: On 05/10/2012 06:18 AM, Charles R Harris wrote:

[Numpy-discussion] read line mixed with string and number?

2012-05-10 Thread Chao YUE
Dear all, I have files which contain lines like this: 30516F5 Sep1985 1-Day RainTrace 0.23.2 Trace 0.0 0.00.00.00.20.0 Trace 29.20.00.00.0 0.01.8 30516F5 Sep1985 1-Day SnowTrace 0.00.00.0 14.8 10.1 Trace 0.00.0

Re: [Numpy-discussion] Masking through generator arrays

2012-05-10 Thread Chris Barker
On Thu, May 10, 2012 at 2:38 AM, Dag Sverre Seljebotn d.s.seljeb...@astro.uio.no wrote: What would serve me? I use NumPy as a glorified double*. all I want is my glorified double*. I'm probably not a representative user.) Actually, I think you are representative of a LOT of users -- it turns,

Re: [Numpy-discussion] Masking through generator arrays

2012-05-10 Thread Scott Ransom
On 05/10/2012 02:23 PM, Chris Barker wrote: On Thu, May 10, 2012 at 2:38 AM, Dag Sverre Seljebotn d.s.seljeb...@astro.uio.no wrote: What would serve me? I use NumPy as a glorified double*. all I want is my glorified double*. I'm probably not a representative user.) Actually, I think you

Re: [Numpy-discussion] Masking through generator arrays

2012-05-10 Thread Inati, Souheil (NIH/NIMH) [E]
On May 10, 2012, at 2:23 PM, Chris Barker wrote: On Thu, May 10, 2012 at 2:38 AM, Dag Sverre Seljebotn d.s.seljeb...@astro.uio.no wrote: What would serve me? I use NumPy as a glorified double*. all I want is my glorified double*. I'm probably not a representative user.) Actually, I

Re: [Numpy-discussion] Masking through generator arrays

2012-05-10 Thread Charles R Harris
On Thu, May 10, 2012 at 12:52 PM, Scott Ransom sran...@nrao.edu wrote: On 05/10/2012 02:23 PM, Chris Barker wrote: On Thu, May 10, 2012 at 2:38 AM, Dag Sverre Seljebotn d.s.seljeb...@astro.uio.no wrote: What would serve me? I use NumPy as a glorified double*. all I want is my

Re: [Numpy-discussion] Masking through generator arrays

2012-05-10 Thread Charles R Harris
On Thu, May 10, 2012 at 1:14 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Thu, May 10, 2012 at 12:52 PM, Scott Ransom sran...@nrao.edu wrote: On 05/10/2012 02:23 PM, Chris Barker wrote: On Thu, May 10, 2012 at 2:38 AM, Dag Sverre Seljebotn d.s.seljeb...@astro.uio.no wrote:

Re: [Numpy-discussion] Masking through generator arrays

2012-05-10 Thread Travis Oliphant
On May 10, 2012, at 1:23 PM, Chris Barker wrote: On Thu, May 10, 2012 at 2:38 AM, Dag Sverre Seljebotn d.s.seljeb...@astro.uio.no wrote: What would serve me? I use NumPy as a glorified double*. all I want is my glorified double*. I'm probably not a representative user.) Actually, I

[Numpy-discussion] spurious space in printing record arrays?

2012-05-10 Thread Benjamin Root
Just noticed this in the output from printing some numpy record arrays: [[('2008081712', -24, -78.0, 20.10381469727, 45.0, -999.0, 0.0)] [ ('2008081718', -18, -79.584741211, 20.70762939453, 45.0, -999.0, 0.0)] [ ('2008081800', -12, -80.3305175781, 21.10381469727, 45.0,

Re: [Numpy-discussion] Masking through generator arrays

2012-05-10 Thread Dag Sverre Seljebotn
On 05/10/2012 08:23 PM, Chris Barker wrote: On Thu, May 10, 2012 at 2:38 AM, Dag Sverre Seljebotn d.s.seljeb...@astro.uio.no wrote: What would serve me? I use NumPy as a glorified double*. all I want is my glorified double*. I'm probably not a representative user.) Actually, I think you

Re: [Numpy-discussion] Masking through generator arrays

2012-05-10 Thread Mark Wiebe
On Thu, May 10, 2012 at 5:27 PM, Dag Sverre Seljebotn d.s.seljeb...@astro.uio.no wrote: On 05/10/2012 08:23 PM, Chris Barker wrote: On Thu, May 10, 2012 at 2:38 AM, Dag Sverre Seljebotn d.s.seljeb...@astro.uio.no wrote: What would serve me? I use NumPy as a glorified double*. all I

Re: [Numpy-discussion] NA-mask interactions with existing C code

2012-05-10 Thread Dag Sverre Seljebotn
On 05/11/2012 12:28 AM, Mark Wiebe wrote: I did some searching for typical Cython and C code which accesses numpy arrays, and added a section to the NEP describing how they behave in the current implementation. Cython code which uses either straight Python access or the buffer protocol is fine

Re: [Numpy-discussion] NA-mask interactions with existing C code

2012-05-10 Thread Dag Sverre Seljebotn
On 05/11/2012 01:06 AM, Mark Wiebe wrote: On Thu, May 10, 2012 at 5:47 PM, Dag Sverre Seljebotn d.s.seljeb...@astro.uio.no mailto:d.s.seljeb...@astro.uio.no wrote: On 05/11/2012 12:28 AM, Mark Wiebe wrote: I did some searching for typical Cython and C code which accesses numpy

Re: [Numpy-discussion] NA-mask interactions with existing C code

2012-05-10 Thread Dag Sverre Seljebotn
Dag Sverre Seljebotn d.s.seljeb...@astro.uio.no wrote: On 05/11/2012 01:06 AM, Mark Wiebe wrote: On Thu, May 10, 2012 at 5:47 PM, Dag Sverre Seljebotn d.s.seljeb...@astro.uio.no mailto:d.s.seljeb...@astro.uio.no wrote: On 05/11/2012 12:28 AM, Mark Wiebe wrote: I did some

Re: [Numpy-discussion] Missing data wrap-up and request for comments

2012-05-10 Thread Matthew Brett
Hi, On Thu, May 10, 2012 at 2:43 AM, Nathaniel Smith n...@pobox.com wrote: Hi Matthew, On Thu, May 10, 2012 at 12:01 AM, Matthew Brett matthew.br...@gmail.com wrote: The third proposal is certainly the best one from Cython's perspective; and I imagine for those writing C extensions against

Re: [Numpy-discussion] Missing data wrap-up and request for comments

2012-05-10 Thread Travis Oliphant
On May 10, 2012, at 3:40 AM, Scott Sinclair wrote: On 9 May 2012 18:46, Travis Oliphant tra...@continuum.io wrote: The document is available here: https://github.com/numpy/numpy.scipy.org/blob/master/NA-overview.rst This is orthogonal to the discussion, but I'm curious as to why this

Re: [Numpy-discussion] Missing data wrap-up and request for comments

2012-05-10 Thread Travis Oliphant
On May 10, 2012, at 12:21 AM, Charles R Harris wrote: On Wed, May 9, 2012 at 11:05 PM, Benjamin Root ben.r...@ou.edu wrote: On Wednesday, May 9, 2012, Nathaniel Smith wrote: My only objection to this proposal is that committing to this approach seems premature. The existing

Re: [Numpy-discussion] NA-mask interactions with existing C code

2012-05-10 Thread Travis Oliphant
I guess this mixture of Python-API and C-API is different from the way the API tries to protect incorrect access. From the Python API, it. should let everything through, because it's for Python code to use. From the C API, it should default to not letting things through, because special

Re: [Numpy-discussion] NA-mask interactions with existing C code

2012-05-10 Thread Dag Sverre Seljebotn
On 05/11/2012 07:36 AM, Travis Oliphant wrote: I guess this mixture of Python-API and C-API is different from the way the API tries to protect incorrect access. From the Python API, it. should let everything through, because it's for Python code to use. From the C API, it should default to