Skip to content

Large scalar powers hang #17148

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

Closed
eric-wieser opened this issue Aug 24, 2020 · 2 comments
Closed

Large scalar powers hang #17148

eric-wieser opened this issue Aug 24, 2020 · 2 comments

Comments

@eric-wieser
Copy link
Member

In [57]: np.int64(2)**(2**62)
Out[57]: 0

In [58]: np.int64(2)**(2**63)
<ipython-input-58-7f1b37f891d0>:1: RuntimeWarning: overflow encountered in power
  np.int64(2)**(2**63)
Out[58]: inf

In [59]: np.int64(2)**(2**64)
# seems to be doing the computation on object arrays?

@seberg
Copy link
Member

seberg commented Aug 24, 2020

This seems like yet another nice example for gh-16287.

If we were to deprecate Python integer to object array coercion (and unsigned integers at least), the second and third examples would be an error. Although that is likely better than the current situation.

@seberg
Copy link
Member

seberg commented Nov 19, 2022

Related to gh-22624 and gh-16287. Going to close this, since I don't think the hanging is the important issue (but the other two are).

@seberg seberg closed this as completed Nov 19, 2022
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

No branches or pull requests

2 participants