[SciPy-user] Add a column to masked array.

Dharhas Pothina Dharhas.Pothina at twdb.state.tx.us
Thu Jul 2 11:58:43 EDT 2009


Hi,

I have a masked array 'data' where data.shape = (1805,4) and another masked array 'a' where a.shape = (1805,) 

I would like to generate a new masked array with the 'a' as the last column , i.e. the final shape should be (1805,5). 

I've tried np.hstack which gave an error 'arrays must have same number of dimensions' and ma.hstack just combines both masked arrays into a list.

how would I go about doing what I need?

thanks

- dharhas







More information about the SciPy-User mailing list