Main improvements are:
Re-organised threshold function - now the calculation of percentile and average are separated in delayed functions.
Added options to handle NaNs, in particular to be able to use mean() and quantile() function without skipna=True by default.
Update xmhw_demo notebook and documentation to reflect changes.
Removed bug from stats and added tests.
Main improvements are: Re-organised threshold function - now the calculation of percentile and average are separated in delayed functions. Added options to handle NaNs, in particular to be able to use mean() and quantile() function without skipna=True by default. Update xmhw_demo notebook and documentation to reflect changes. Removed bug from stats and added tests.