When getting extremes with threshold, pyextremes should warn that the threshold is too high/low
wiz21b opened this issue · 1 comments
wiz21b commented
When doing
model.get_extremes(method="POT", threshold=20,..., extremes_type="high"
if the threshold is set too high so that no extreme can be found, pyextremes gives an stacktrace which is bit hard to understand (ValueError: attempt to get argmax of an empty sequence
). It'd be nice to have a proper error message saying that no extreme could be found.
georgebv commented
Thank you, good point, should be easy to add. Feel free to create a PR if you'd like to contribute; otherwise, I'll be adding this in next release.