[Numpy-discussion] Subclassing ma.MaskedArray

2010-03-16 Thread David Carmean
I understand that ma.MaskedArray is a subclass of ndarray; in addition to the requirements for subclassing the latter, what does ma.MaskedArray add to the list? I.e. what do I have to watch out for? Basically I need a version of Luke Campagnola's MetaArray ( http://www.scipy.org/Cookbook/M

Re: [Numpy-discussion] RHEL 5.3+ build?

2010-02-24 Thread David Carmean
On Wed, Feb 24, 2010 at 06:37:08AM -0800, David Carmean wrote: > On Wed, Feb 24, 2010 at 08:59:05AM -0500, Michael Droettboom wrote: > > > > We (STScI) routinely build Numpy on RHEL5.x 64-bit systems for our internal > > use. We need more detail about what you're do

Re: [Numpy-discussion] RHEL 5.3+ build?

2010-02-24 Thread David Carmean
On Wed, Feb 24, 2010 at 08:59:05AM -0500, Michael Droettboom wrote: > We (STScI) routinely build Numpy on RHEL5.x 64-bit systems for our internal > use. We need more detail about what you're doing and what errors you're > seeing to diagnose the problem. OK, that's encouraging; it may take a f

[Numpy-discussion] RHEL 5.3+ build?

2010-02-23 Thread David Carmean
Does anyone use/build this stuff on RHEL 5.3+ (x64)? :) Seems not so much. I'd like to use numpy (and PyTables) for a few tasks where it would be much more efficient to have much of the processing performed on the servers generating the data (about 400 systems) than backhauling the huge amo

Re: [Numpy-discussion] Why does np.nan{min, max} clobber my array mask?

2010-02-15 Thread David Carmean
On Sun, Feb 14, 2010 at 03:22:04PM -0500, Pierre GM wrote: > > I'm sorry, I can't follow you. Can you post a simpler self-contained example > I can play with ? > Why using np.nanmin/max ? These functions are designed for ndarrays, to avoid > using a masked array: can't you just use min/max on t

[Numpy-discussion] Why does np.nan{min, max} clobber my array mask?

2010-02-13 Thread David Carmean
I'm just starting to work with masked arrays and I've found some behavior that definitely does not follow the Principle of Least Surprise: I've generated a 2-d array from a list of lists, where the elements are floats with a good number of NaNs. Inspections shows the expected numbers for ma.c

[Numpy-discussion] Shape of join_by result is not what I expected

2010-02-10 Thread David Carmean
On Tue, Feb 09, 2010 at 04:02:48PM -0600, Robert Kern wrote: > numpy.lib.recfunctions.join_by(key, r1, r2, jointype='leftouter') > * The output is sorted along the key. > * A temporary array is formed by dropping the fields not in the key for > the > two arrays and concatenating th

Re: [Numpy-discussion] lib.recfunctions: which version? (was Re: Emulate left outer join?)

2010-02-10 Thread David Carmean
On Wed, Feb 10, 2010 at 04:12:27PM -0600, Robert Kern wrote: > > I still can't figure out what to import/how to get to > > numpy.lib.recfunctions. > > Maybe I don't yet understand the scipy/numpy/matplotlib package structure? > > from numpy.lib import recfunctions > > recfunctions.join_by(...)

[Numpy-discussion] lib.recfunctions: which version? (was Re: Emulate left outer join?)

2010-02-10 Thread David Carmean
On Tue, Feb 09, 2010 at 04:49:30PM -0600, John Hunter wrote: > On Tue, Feb 9, 2010 at 4:43 PM, Fernando Perez wrote: > > On Tue, Feb 9, 2010 at 5:02 PM, Robert Kern wrote: > >> > >> numpy.lib.recfunctions.join_by(key, r1, r2, jointype='leftouter') > >> Sorry, guys, maybe this is my python-newbne

Re: [Numpy-discussion] Emulate left outer join?

2010-02-10 Thread David Carmean
On Tue, Feb 09, 2010 at 04:49:30PM -0600, John Hunter wrote: > On Tue, Feb 9, 2010 at 4:43 PM, Fernando Perez wrote: > > On Tue, Feb 9, 2010 at 5:02 PM, Robert Kern wrote: > >> > >> numpy.lib.recfunctions.join_by(key, r1, r2, jointype='leftouter') > >> > > > > And if that isn't sufficient, John h

[Numpy-discussion] Emulate left outer join?

2010-02-09 Thread David Carmean
Hi, I've been working with numpy for less than a month, having learned about it after finding matplotlib. My foundation in things like set theory is... weak to nonexistent, so I need a little help mapping sql-like thoughts into set-theory thinking :) Some context to help me explain: I'm try