[SciPy-user] Add a column to masked array.
Thu Jul 2 12:52:17 CDT 2009
thank you. ma.column_stack works great.
>>> Pierre GM <email@example.com> 7/2/2009 11:57 AM >>>
On Jul 2, 2009, at 11:58 AM, Dharhas Pothina wrote:
> 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'
The corresponding standard numpy functions don't know how to process
the mask and tend to fail miserably.
> and ma.hstack just combines both masked arrays into a list.
I've never been able to remember what vstack, hstack and stack do
respectively, so I use error/trial and the online help...
SciPy-user mailing list
More information about the SciPy-user