✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
import pysal as psimport numpy as np
# Координати точокpoints = np.array([[0, 0], [1, 1], [0, 2], [2, 2]])w1 = ps.knnW_from_array(points, k=2)w2 = ps.threshold_binaryW_from_array(points, threshold=2.0)
print(w1.neighbors[0])print(w2.neighbors[0])
Які об'єкти будуть сусідніми для точки з індексом 0 в обох випадках?