Easiest way to *add a column* to a 2d matrix/array in numarray???

Christian Seberino seberino at spawar.navy.mil
Tue Apr 20 12:03:19 EDT 2004


How add a column to a 2d array/matrix in numarray???

The unelegant way I found was to:

1. Create a new array with an extra column (e.g. using 'zeros' function).
2. Copy original array into new array.
3. Copy new column into last column.

Is there a slicker way to do this?

Chris



More information about the Python-list mailing list