[Numpy-discussion] PEP: named axis
Bruce Southey
bsouthey at gmail.com
Fri Feb 6 10:31:47 EST 2009
Hi,
+1 on the idea but how will this work with other numpy methods?
suppose *arr* is a structured array with dtype:
[('name', 'S25'),
('height', float),
('age', int),
('gender', 'S8')
]
Would you be able to first define a list of columns such as
cols=['height', 'age']
arr[cols]
This would be a handy feature.
For example, for some compatible array A, would you be able to the
following with a view
np.linalg.lstsq(A, arr[['age']])
np.linalg.lstsq(A,arr[['height', 'age']]
Bruce
More information about the NumPy-Discussion
mailing list