hanya array ukuran-1 yang dapat dikonversi menjadi skalar python

# TypeError: only size-1 arrays can be converted to Python scalars
# Most often from trying to convert a NumPy array values to another format

#solution use astype:

x = np.array([1.0,2.0,3.0])

x.astype(int)
NotACoder