How to convert real numpy array to int numpy array? Tried using map directly to array but it did not work.
you can use np.int_:
np.int_
>>> x = np.array([[1.0, 2.3], [1.3, 2.9]]) >>> x array([[ 1. , 2.3], [ 1.3, 2.9]]) >>> np.int_(x) array([[1, 2], [1, 2]])