Aug-10-2024, 06:06 AM

I was using Numpy and try to find the number in an array which is the closest to the number 57. I write the following code.

a = np.array([78,22,65,87,12,98,63,79]) x = 57 a[np.argmin(np.abs(a - x))]The output I get is

`Output:np.int64(63)`

instead of 63 only. I am guessing it has to do with some setting in my system. Can you explain how I can get the number only without the data type? Thanks in advance.