<s>[INST] How to convert 2D float numpy array to 2D int numpy array? How to convert real numpy array to int numpy array?
Tried using map directly to array but it did not work.
 [/INST] Use the astype method.
>>> x = np.array([[1.0, 2.3], [1.3, 2.9]])
>>> x
array([[ 1. ,  2.3],
       [ 1.3,  2.9]])
>>> x.astype(int)
array([[1, 2],
       [1, 2]])

 </s>