Using None to denote z is not available is fine in methods such as update(), but it really falls apart when using batch_filter. Typically I would have zs as an np.array, not a list. Having to convert to a list and then assigning None just isn't very NumPyish.
I would just single functions like update should use the test:
if z is None or z is ma.masked:
and then you can pass what you want into methods like batch_filter.
Using None to denote z is not available is fine in methods such as update(), but it really falls apart when using batch_filter. Typically I would have zs as an np.array, not a list. Having to convert to a list and then assigning None just isn't very NumPyish.
I would just single functions like update should use the test:
and then you can pass what you want into methods like batch_filter.