Alright, extreme rookie question. In my program, I create a numpy 2D array, some of which are missing entries (rather than a "nan" type of nonexistent, but a "None", or NoneType). I would like to mask these entries, but it looks like I'm having problems with this. Normally, to mask, say, all records with a value of 2, I would do
A = np.ma.masked_where (A [A == 2], A)
In this case, this does not work no matter what I try to use for the first parameter. Thoughts?
source
share