On Feb 10, 2012, at 3:29 PM, Brad Reisfeld wrote:

> Hi,
> 
> I am relatively new to numpy and am seeking some advice on an
> appropriate way to do the following simple task.
> 
> The idea is to build a class that will allow a user to easily remove
> and keep columns and rows in a 2D numpy array.
<clip>

Apart from the good suggestions already made, you may also find useful the 
carray package available in:

https://github.com/FrancescAlted/carry

It implements a ctable object that has different capabilities:

* Allows addition and removal of columns very efficiently
* Allows to enlarge and shrink the ctable
* Supports compression (via the fast blosc compressor)
* If numexpr is installed, you can seamlessly operate with columns efficiently
* You can efficiently select rows using complex conditions (needs numexpr too)

You can have a quick look at how this works in the second part of the tutorial:

https://github.com/FrancescAlted/carray/blob/master/doc/tutorial.rst

Hope it helps,

-- Francesc Alted



_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to