Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Cleaner & faster doctests #218

Merged
merged 3 commits into from
May 15, 2024
Merged

Cleaner & faster doctests #218

merged 3 commits into from
May 15, 2024

Conversation

jorenham
Copy link
Owner

@jorenham jorenham commented May 15, 2024

  • Remove the +ELLIPSIS workarounds when comparing rounded floats, by using FLOAT_CMP from pytest-doctestplus instead.
  • Improved lmo.l_loc docs and examples, and mention that the trimmed L-location generalized not only the mean, but also unifies it with the median, minimum and maximum (which hasn't been pointed out in the literature before, to my knowledge)
  • Significant speedup of the theoretical.l_comoment_from_pdf doctest, by replacing the marginal CDF scipy.stats.t.cdf with scipy.special.stdtr, so that it isn't a major CI performance bottleneck anymore.
  • Fall back to the order-statistics method for weight calculation if $r+s+t>24$, avoiding (explosive) numerical errors with large moment- or trim- orders (e.g. when using trimmed L-loc for median, min or max).

@jorenham jorenham merged commit 727c4ee into dev May 15, 2024
18 checks passed
@jorenham jorenham deleted the feature/doctest-float-cmp branch May 15, 2024 22:09
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant