Closed bruno-f-cruz closed 4 days ago
Due to the way numpy scalar types are handled as of numpy 2.0 (https://numpy.org/neps/nep-0050-scalar-promotion.html), the following line:
https://github.com/harp-tech/harp-python/blob/c90387efdbb4d762073201b763025dd49d5d3117/harp/io.py#L84
throws the following error:
OverflowError: Python integer 1012842 out of bounds for uint8
This bug seems to be affecting the library in different places and we should test this before making any big changes. For now, lets clamp the numpy dependency to <2
Just encountered this as well -- explicitly casting stride and payloadtype to np.int32 fixes the problem for the read function.
stride
payloadtype
np.int32
read
Due to the way numpy scalar types are handled as of numpy 2.0 (https://numpy.org/neps/nep-0050-scalar-promotion.html), the following line:
https://github.com/harp-tech/harp-python/blob/c90387efdbb4d762073201b763025dd49d5d3117/harp/io.py#L84
throws the following error:
This bug seems to be affecting the library in different places and we should test this before making any big changes. For now, lets clamp the numpy dependency to <2