[Numpy-discussion] Join and stacking for structured arrays
aldcroft at head.cfa.harvard.edu
Fri Sep 6 13:06:23 EDT 2013
For the astropy Table class (which wraps numpy structured arrays), I
wrote functions that perform table joins and concatenate tables along
rows or columns. These are reasonably full-featured and handle most
of the common needs for these operations. The join function here
addresses some limitations in the lib.recfunctions.join_by() function.
You can see the documentation for the Table interface to these
functions at .
The reason I'm writing is that the implementation is split into a pure
numpy-based module (no astropy dependence ) and the astropy bit.
Essentially all of the real work is done in the numpy-based module, so
I'm wondering if the numpy project is interested in this code for
inclusion into numpy. If so, I'd be happy to put together a pull
request. I would just need direction on:
- Where to put it
- What function names to use
- How to setup for included Cython code
The Python and Cython code and tests can be see at , , . The
tests are currently based on astropy Tables, so these would be
modified to use plain ndarray or masked arrays.
: There is a requirement for an OrderedDict which is currently
provided by astropy for python 2.6.
More information about the NumPy-Discussion