Skip to content

dtype_from_element does identify all integers that need object dtype #50

Description

@flexatone

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) ---------------------------------------------------------------------------OverflowErrorTraceback (mostrecentcalllast)
<ipython-input-7-64f1d1e93b0e>in<module>---->1np.array(-9223372036854775809, dtype=np.int64)
OverflowError: PythoninttoolargetoconverttoClong

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions