[Numpy-discussion] PEP: named axis

Bruce Southey bsouthey@gmail....
Fri Feb 6 09:31:47 CST 2009

+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'] 
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']]


More information about the Numpy-discussion mailing list