[Numpy-discussion] using a vector of values in masked array's filled() function
Gregor Leban
gleban@gmail....
Mon Feb 12 02:51:54 CST 2007
Hi,
I'm converting my Numeric code to numpy and I ran into a problem.
In Numeric the MA.filled() function was able to accept a vector of fill
values and it used the first value in the vector to fill the missing values
in the first row of the matrix, the second value for the second row, etc.
The filled() function in numpy now throws an exception "ValueError: array is
not broadcastable to correct shape" if I give it a vector of fill values.
Is there any other way or function in numpy that would perform the thing as
Numeric did? I know that I could write a loop but I often have data with a
huge number of rows and I would prefer some optimized way of doing this.
Best regards,
Gregor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20070212/bbd14ec0/attachment.html
More information about the Numpy-discussion
mailing list