Dharhas Pothina | 2 Jul 17:58
Picon
Picon
Favicon

Add a column to masked array.

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

Gmane