Skip to content

tensor.asarray raises unexpected TypeError for out of bound inputs #1512

@oleksandr-pavlyk

Description

@oleksandr-pavlyk
dpt.asarray(-9223372036854775809, dtype=dpt.uint8)
# raises TypeError: Numpy array of data type object is not supported. Please convert the input to an array with numeric data type.

Array API test suite expected OverflowError:

np.asarray(-9223372036854775809, dtype=dpt.uint8)
# raises OverflowError: Python int too large to convert to C long

This discrepancy is behind Array API test suite failure of test_int_to_dtype.

Metadata

Metadata

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