Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Fix percentiles #37

Merged
merged 1 commit into from
Oct 20, 2023
Merged

Fix percentiles #37

merged 1 commit into from
Oct 20, 2023

Conversation

inglesp
Copy link
Contributor

@inglesp inglesp commented Oct 17, 2023

The percentile boundaries generated by np.arange did not round correctly when scaled up to integers.

Specifically:

    >>> (np.arange(0.01, 0.1, 0.01) * 100).astype(int)
    array([1, 2, 3, 4, 5, 6, 6, 8, 9])
    >>> np.arange(0.01, 0.1, 0.01)[6]
    0.06999999999999999

We work around this by specifying the percentile boundaries explicitly.

The percentile boundaries generated by np.arange did not round correctly
when scaled up to integers.

Specifically:

        >>> (np.arange(0.01, 0.1, 0.01) * 100).astype(int)
        array([1, 2, 3, 4, 5, 6, 6, 8, 9])
        >>> np.arange(0.01, 0.1, 0.01)[6]
        0.06999999999999999

We work around this by specifying the percentile boundaries explicitly.
@inglesp inglesp mentioned this pull request Oct 20, 2023
@inglesp
Copy link
Contributor Author

inglesp commented Oct 20, 2023

Thanks @LFISHER7 and @ccunningham101 for your input on #31. Sorry it's taken us so long to address this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants