Я хочу найти ближайшую точку к точке p, но она не работает
import numpy as np
import matplotlib.pyplot as plt
point = np.array([[1,1],[1,2],[1,3],[2,1], [2,2],[2,3], [3,1], [3,2], [3,3]])
p = np.array([2.5,2])
plt.plot(point[:,0], point[:,1], "ro")
plt.plot(p[0], p[1], "bo")
**This section is where it got the error**
distance = np.zeros(point.shape[0])
for i in range(len(distance)):
distance[i] = distance(p, point[i])
distance[4]