filterpy
filterpy copied to clipboard
Use masked array for zs?
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.
Hi ! First of all thanks for your great work :)
Indeed, the support of masked array would be great and it works fine with the batch-filter method.
I just did a pull request.
You can find a working example here: https://github.com/antoinecollet5/kalman-filtering/blob/develop/linear_case_filterpy.ipynb
Cheers