Код: Выделить всё
#For 1.23.3 version
import numpy as np
x = np.uint64(0xffffffff)
print(-x)
#output
18446744069414584321
Код: Выделить всё
#For 1.25.0 version
import numpy as np
x = np.uint64(0xffffffff)
print(-x)
#output
18446744069414584321
:1: RuntimeWarning: overflow encountered in scalar negative
print(-x)
Подробнее здесь: https://stackoverflow.com/questions/774 ... r-negative
Мобильная версия