using a vector of values in masked array's filled() function
![](https://secure.gravatar.com/avatar/6ea5da40bb7cd33c6b336953813e845e.jpg?s=120&d=mm&r=g)
12 Feb
2007
12 Feb
'07
12:51 a.m.
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
6397
Age (days ago)
6397
Last active (days ago)
0 comments
1 participants
participants (1)
-
Gregor Leban