To return the trunc of the array elements, element-wise, use thenumpy.trunc()method in Python Numpy. The new location where we will store the result is a new array. The function returns the truncated value of e
In case anyone would like a work-around, you can easily cast to an integer array after floor is called: import numpy as np x = np.arange(10) / 2 xfloor_int = np.floor(x).astype(int) # array of ints chatcannon commentedon Dec 25, 2020 ...