Re: [Numpy-discussion] ANN: MaskedArray as a subclass of ndarray -?followup

2007-01-19 Thread Travis Oliphant
Matt Knox wrote: >>Moving the implementation to the C-level also has its downside. To >>me, at least, Python code is much more readable and hence easier to >>maintain. >> >>Is there a way that we can implement only the speed-critical methods >>in C? >> >>Cheers >>Stéfan >> >> >> > >Implementi

Re: [Numpy-discussion] ANN: MaskedArray as a subclass of ndarray?-?followup

2007-01-19 Thread Robert Kern
Stefan van der Walt wrote: > A "nice C level api" sounds like the definition of oxymoron :) Why > would we argue for more C than absolutely necessary in a Python-based > library? Well, it's more often absolutely necessary than you might think. Any common operation on the array should be written i

Re: [Numpy-discussion] ANN: MaskedArray as a subclass of ndarray?-?followup

2007-01-19 Thread Francesc Altet
El dv 19 de 01 del 2007 a les 18:08 +0200, en/na Stefan van der Walt va escriure: > On Fri, Jan 19, 2007 at 02:13:52PM +, Matt Knox wrote: > > > Moving the implementation to the C-level also has its downside. To > > > me, at least, Python code is much more readable and hence easier to > > > ma

Re: [Numpy-discussion] ANN: MaskedArray as a subclass of ndarray?-?followup

2007-01-19 Thread Stefan van der Walt
On Fri, Jan 19, 2007 at 02:13:52PM +, Matt Knox wrote: > > Moving the implementation to the C-level also has its downside. To > > me, at least, Python code is much more readable and hence easier to > > maintain. > > > > Is there a way that we can implement only the speed-critical methods > >

Re: [Numpy-discussion] ANN: MaskedArray as a subclass of ndarray -?followup

2007-01-19 Thread Matt Knox
> Moving the implementation to the C-level also has its downside. To > me, at least, Python code is much more readable and hence easier to > maintain. > > Is there a way that we can implement only the speed-critical methods > in C? > > Cheers > Stéfan > Implementing the whole thing in C also h

Re: [Numpy-discussion] ANN: MaskedArray as a subclass of ndarray - followup

2007-01-19 Thread Matt Knox
> That time series module sounds very interesting! Is it available > somewhere, or some documentation? > > Thank you, > Sven > Not really any documentation yet, and the code is still in a state of flux, so expect frequent changes/additions at this point still. No concern is being given to "bac

Re: [Numpy-discussion] ANN: MaskedArray as a subclass of ndarray - followup

2007-01-19 Thread Stefan van der Walt
On Fri, Jan 19, 2007 at 10:56:16AM +0100, Sven Schreiber wrote: > Matt Knox schrieb: > > > > > I am definitely in favor of the new maskedarray implementation. I've been > > working with Pierre on a time series module which is a subclass of the new > > masked array implementation, and having it as

Re: [Numpy-discussion] ANN: MaskedArray as a subclass of ndarray -?followup

2007-01-19 Thread Stefan van der Walt
On Thu, Jan 18, 2007 at 06:18:22PM +, Matt Knox wrote: > > For 1.1 I would really like to move most of the often-used sub-classes > > of the ndarray to the C-level and merge in functionality from CVXOPT. > > Moving the implementation to the C-level would be awesome. In particular, > __getitem

Re: [Numpy-discussion] ANN: MaskedArray as a subclass of ndarray - followup

2007-01-19 Thread Sven Schreiber
Matt Knox schrieb: > > I am definitely in favor of the new maskedarray implementation. I've been > working with Pierre on a time series module which is a subclass of the new > masked array implementation, and having it as a subclass of ndarray definitely > has advantages (and no real disadvantage

Re: [Numpy-discussion] ANN: MaskedArray as a subclass of ndarray - followup

2007-01-18 Thread Matt Knox
> This makes sense to me. I'm generally favorable to the new maskedarray > (I actually like the idea of it being a sub-class). I'm just waiting > for people that actually use the MaskedArray to comment. > > For 1.1 I would really like to move most of the often-used sub-classes > of the ndarr

Re: [Numpy-discussion] ANN: MaskedArray as a subclass of ndarray - followup

2007-01-17 Thread Travis Oliphant
Eric Firing wrote: >Pierre GM wrote: > > >>All, >>I've updated this famous reimplementation of maskedarray I keep ranting about. >> >> >[...] > > >>I also put the file `timer_comparison.py`, that runs some unittests with each >>implementation >>(numpy.core.ma and maskedarray), and outputs

Re: [Numpy-discussion] ANN: MaskedArray as a subclass of ndarray - followup

2007-01-17 Thread Eric Firing
Pierre GM wrote: > All, > I've updated this famous reimplementation of maskedarray I keep ranting about. [...] > I also put the file `timer_comparison.py`, that runs some unittests with each > implementation > (numpy.core.ma and maskedarray), and outputs the minimum times. > On my machine, there d

[Numpy-discussion] ANN: MaskedArray as a subclass of ndarray - followup

2007-01-02 Thread Pierre GM
All, I've updated this famous reimplementation of maskedarray I keep ranting about. A new feature has been introduced : hard_mask. When a masked array is created with the flag hard_mask=True, the mask can only grow, not shrink. In other terms, masked values cannot be unmasked. The flag hard_mask is