masked-array

Can you assign only unmasked values using numpy.ma?

Can you assign only unmasked values using numpy.ma? Question: Is there a way to copy values from one numpy masked array to another where ONLY the unmasked values are copied and the target values are left unchanged for masked source values? It seems like this should be handled automatically, but so far I haven’t found …

Total answers: 1

How to properly mask a numpy 2D array?

How to properly mask a numpy 2D array? Question: Say I have a two dimensional array of coordinates that looks something like x = array([[1,2],[2,3],[3,4]]) Previously in my work so far, I generated a mask that ends up looking something like mask = [False,False,True] When I try to use this mask on the 2D coordinate …

Total answers: 6