Код: Выделить всё
import numpy as np
x = np.array([-1.0, 1.0, 2.0])
y=0
y= y.astype(np.int64)
y=x>0
print(y)
Код: Выделить всё
AttributeError: 'int' object has no attribute 'astype'
Что мне делать, чтобы изменить тип переменной y — int?
Подробнее здесь: https://stackoverflow.com/questions/792 ... ute-astype