[Numpy-discussion] Selection of only a certain number of fields
Stéfan van der Walt
stefan at sun.ac.za
Fri Feb 6 04:12:31 EST 2009
Hi Travis
2009/2/6 Travis Oliphant <oliphant at enthought.com>:
> Thus newarr = arr[['name', 'age']].copy() would be exactly the same
> size as arr because elements are copied wholesale and each "row" is a
> single element in the NumPy array. Some infrastructure would have to
> be implemented at a fundamental level to handle partial-element
> manipulation similar at least in spirit to what is needed to handle
> bit-level striding on a fundamental level.
I like your suggestion! Can you think of a way to implement #2 with
the correct copy semantics? Being able to create a view without
copying is such a big plus that it is worth considering, even at an
implementation cost.
Regards
Stéfan
More information about the NumPy-Discussion
mailing list