You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the number of samples is less then required, methods from this crate usually returns NaN.
It's correct, but requires user to check the result or verify the number of samples.
Maybe return Option instead? This will be consistent with other methods on Iterator.
Activity
vks commentedon May 13, 2024
We could add a
try_*API returning anOptionorResult, but I'm not sure it's possible to guarantee noNaNis returned due to other reasons.Shatur commentedon May 20, 2024
Sure, but at least it won't return NaN for an empty iterator. I would make this default behavior, without additional
try_*method.