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

dtype_from_element does identify all integers that need object dtype #50

Open
flexatone opened this issue Jun 4, 2021 · 1 comment
Open
Assignees

Comments

@flexatone
Copy link
Contributor

SF's hypothesis tests found a case where dtype_from_element incorrectly identifies a large int as compatible with int64. Perhaps this test case can help refine the implementation?

>>> arraykit.dtype_from_element(-9223372036854775809)                                                                                                                                                                      
dtype('int64')
>>> np.array(-9223372036854775809, dtype=np.int64)                                                                                                                                                                         
---------------------------------------------------------------------------
OverflowError                             Traceback (most recent call last)
<ipython-input-7-64f1d1e93b0e> in <module>
----> 1 np.array(-9223372036854775809, dtype=np.int64)

OverflowError: Python int too large to convert to C long
@chaburkland
Copy link
Collaborator

Oh no! I'll look into 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

No branches or pull requests

2 participants