Re: [Numpy-discussion] A reimplementation of MaskedArray

2006-11-09 Thread Tim Hochberg
A. M. Archibald wrote: On 08/11/06, Tim Hochberg [EMAIL PROTECTED] wrote: It has always been my experience (on various flavors or Pentium) that operating on NANs is extremely slow. Does anyone know on what hardware NANs are *not* slow? Of course it's always possible I just never notice

Re: [Numpy-discussion] A reimplementation of MaskedArray

2006-11-09 Thread Christopher Barker
Tim Hochberg wrote: I've been told that operations on NANs are slow because they aren't always implemented in the FPU hardware. Instead they are trapped and implemented software or firmware or something or other. which still doesn't make sense -- doesn't ANY operation with a NaN return

Re: [Numpy-discussion] A reimplementation of MaskedArray

2006-11-09 Thread Tim Hochberg
Christopher Barker wrote: Tim Hochberg wrote: I've been told that operations on NANs are slow because they aren't always implemented in the FPU hardware. Instead they are trapped and implemented software or firmware or something or other. which still doesn't make sense --

Re: [Numpy-discussion] A reimplementation of MaskedArray

2006-11-09 Thread Paul Dubois
Disappointed in NaN land?Since the function of old retired persons is to tell youngsters stories around the campfile:A supercomputer hardware designer told me that when forced to add IEEE arithmetic to his designs that it decreased performance substantially, maybe 25-30%; it wasn't that doing the

Re: [Numpy-discussion] A reimplementation of MaskedArray

2006-11-09 Thread A. M. Archibald
On 09/11/06, Paul Dubois [EMAIL PROTECTED] wrote: Since the function of old retired persons is to tell youngsters stories around the campfile: I'll pull up a log. But since I'm uppity, and not especially young, I hope you won't mind if I heckle. A supercomputer hardware designer told me that

Re: [Numpy-discussion] A reimplementation of MaskedArray

2006-11-08 Thread Pierre GM
Michael, First of all, thanks for your interest in the exercise of style the new implementation of MaskedArray is basically nothing but. On Tuesday 07 November 2006 20:11, Michael Sorich wrote: 1. It would be nice if the masked_singleton could be passed into a ndarray, as this would allow it

Re: [Numpy-discussion] A reimplementation of MaskedArray

2006-11-08 Thread A. M. Archibald
On 08/11/06, Pierre GM [EMAIL PROTECTED] wrote: I like your idea, but not its implementation. If MA.masked_singleton is defined as an object, as you suggest, then the dtype of the ndarray it is passed to becomes 'object', as you pointed out, and that is not something one would naturally

Re: [Numpy-discussion] A reimplementation of MaskedArray

2006-11-08 Thread Pierre GM
A good candidate for should be masked marked is NaN. It is supposed to mean, more or less, no sensible value. Which might turn out out to be the best indeed. Michael's application would then look like import numpy as N import maskedarray as MA maskit = N.nan test = N.array([1,2,maskit])

Re: [Numpy-discussion] A reimplementation of MaskedArray

2006-11-08 Thread Tim Hochberg
A. M. Archibald wrote: On 08/11/06, Pierre GM [EMAIL PROTECTED] wrote: I like your idea, but not its implementation. If MA.masked_singleton is defined as an object, as you suggest, then the dtype of the ndarray it is passed to becomes 'object', as you pointed out, and that is not

Re: [Numpy-discussion] A reimplementation of MaskedArray

2006-11-08 Thread A. M. Archibald
On 08/11/06, Tim Hochberg [EMAIL PROTECTED] wrote: It has always been my experience (on various flavors or Pentium) that operating on NANs is extremely slow. Does anyone know on what hardware NANs are *not* slow? Of course it's always possible I just never notice NANs on hardware where they

Re: [Numpy-discussion] A reimplementation of MaskedArray

2006-11-07 Thread Michael Sorich
On 10/25/06, Pierre GM [EMAIL PROTECTED] wrote: On Tuesday 24 October 2006 02:50, Michael Sorich wrote: I am currently running numpy rc2 (I haven't tried your reimplementation yet as I am still using python 2.3). I am wondering whether the new maskedarray is able to handle construction of

Re: [Numpy-discussion] A reimplementation of MaskedArray

2006-10-24 Thread Michael Sorich
I am currently running numpy rc2 (I haven't tried your reimplementation yet as I am still using python 2.3). I am wondering whether the new maskedarray is able to handle construction of arrays from masked scalar values (not sure if this is the correct term). I ran across a situation recently when

Re: [Numpy-discussion] A reimplementation of MaskedArray

2006-10-24 Thread Pierre GM
On Tuesday 24 October 2006 02:50, Michael Sorich wrote: I am currently running numpy rc2 (I haven't tried your reimplementation yet as I am still using python 2.3). I am wondering whether the new maskedarray is able to handle construction of arrays from masked scalar values (not sure if this

[Numpy-discussion] A reimplementation of MaskedArray + MaskedRecords

2006-10-23 Thread Pierre GM
Folks, I updated the alternative implementation of MaskedArray on the wiki, mainly to correct a couple of bugs. (http://projects.scipy.org/scipy/numpy/wiki/MaskedArray) In addition, I attached another file, maskedrecordarray, which introduce a new class, MaskedRecord, as a subclass of recarray

[Numpy-discussion] A reimplementation of MaskedArray + MaskedRecords

2006-10-22 Thread P GM
Folks,I updated the alternative implementation of MaskedArray on the wiki, mainly to correct a couple of bugs. (http://projects.scipy.org/scipy/numpy/wiki/MaskedArray )In addition, I attached another file, maskedrecordarray, which introduce a new class, MaskedRecord, as a subclass of recarray and

[Numpy-discussion] A reimplementation of MaskedArray

2006-10-16 Thread Pierre GM
Folks, I just posted on the scipy/developers zone wiki (http://projects.scipy.org/scipy/numpy/wiki/MaskedArray) a reimplementation of the masked_array mopdule, motivated by some problems I ran into while subclassing MaskedArray. The main differences with the initial numpy.core.ma package are

Re: [Numpy-discussion] A reimplementation of MaskedArray

2006-10-16 Thread Michael Sorich
Does this new MA class allow masking of rearray like arrays? The numpy (1.0b5) version does not seem to. e.g. from numpy import * desc = [('name','S30'),('age',int8),('weight',float32)] a = array([('Bill',31,260.0),('Fred', 15, 145.0)], dtype=desc) print a[0] print a['name'] a2 =

Re: [Numpy-discussion] A reimplementation of MaskedArray

2006-10-16 Thread Pierre GM
On Monday 16 October 2006 22:08, Michael Sorich wrote: Does this new MA class allow masking of rearray like arrays? Excellent question! Which is to say, I have no idea... I don't use recordarray, so I didn't think about testing them. So, a first test indicates that it doesn't work either. The