Skip to content

MAINT: Update the np.finfo annotations #19540

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

Merged
merged 1 commit into from
Jul 27, 2021
Merged

MAINT: Update the np.finfo annotations #19540

merged 1 commit into from
Jul 27, 2021

Conversation

BvB93
Copy link
Member

@BvB93 BvB93 commented Jul 22, 2021

Reflect the finfo changes, made in #18536, in the classes' type annotations.

Reflect the `finfo` changes, made in numpy#18536, in the classes' type annotations.
@seberg
Copy link
Member

seberg commented Jul 22, 2021

Hmm, @bashtage the von-mieses tests fails in one of the runs here:

    @pytest.mark.parametrize("mu", [-7., -np.pi, -3.1, np.pi, 3.2])
5690
    @pytest.mark.parametrize("kappa", [1e-9, 1e-6, 1, 1e3, 1e15])
    def test_vonmises_large_kappa_range(self, mu, kappa):
        r = random.vonmises(mu, kappa, 50)
>       assert_(np.all(r > -np.pi) and np.all(r <= np.pi))
E       AssertionError

kappa      = 1000.0
mu         = 3.141592653589793

I guess this can probably be assumed to be rounding errors in the RNG that are exceedingly unlikely and can't be avoided (i.e. the test is potentially stricter than we can guarantee)? Or is this worrying?

@bashtage
Copy link
Contributor

That random looks like it isn't seeded. It should get a seed, or these will continue to occur with some tiny probability in the future.

@charris charris merged commit 2f782a2 into numpy:main Jul 27, 2021
@charris
Copy link
Member

charris commented Jul 27, 2021

Thanks Bas.

charris added a commit to charris/numpy that referenced this pull request Jul 27, 2021
This makes the test reproducible. See comments on failing test
in numpy#19540.
@BvB93 BvB93 deleted the getlimits branch July 27, 2021 15:50
scratchmex pushed a commit to scratchmex/numpy that referenced this pull request Aug 13, 2021
This makes the test reproducible. See comments on failing test
in numpy#19540.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants