ioos / ioos_qc

:ballot_box_with_check: :ocean: IOOS QARTOD and other Quality Control tests implemented in Python
https://ioos.github.io/ioos_qc/
Apache License 2.0
46 stars 27 forks source link

Attempt to fix issue 86 #88

Closed ocefpaf closed 1 year ago

ocefpaf commented 1 year ago

@kwilcox I believe we were relying on a bug and passing an empty y to CubicSpline should return a ValuError but instead we just moved the iteration forward. This PR passes zeroes to ensure we have finite elements to start the iteration.

kwilcox commented 1 year ago

Could we raise a ValueError instead of returning a zeroed out array? That is what the calling function __get_daily_interp_subset expects? Raising a ValueError results in the same outcome.

ocefpaf commented 1 year ago

Could we raise a ValueError instead of returning a zeroed out array? That is what the calling function __get_daily_interp_subset expects? Raising a ValueError results in the same outcome.

That is better. Working on it...

PS: That should probably be in SciPy.