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

Dharhas Pothina Dharhas.Pothina@twdb.state.tx...
Thu Jul 2 10:58:43 CDT 2009


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?


- dharhas

More information about the SciPy-user mailing list