Seuls les tableaux de taille 1 peuvent être convertis en scalaires 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