Versionen im Vergleich

Schlüssel

  • Diese Zeile wurde hinzugefügt.
  • Diese Zeile wurde entfernt.
  • Formatierung wurde geändert.

---------------------------------------------------------------------------

https://www.briandunning.com/sample-data/points = np.array([[1, 1], [2, 2], [3, 1], [1000, 1000]])
p = np.array([[800, 300]])
d = points - p
sd = np.square(d)
dists = sd.sum(axis=1)
dist = np.sqrt(dists)
dist.argmin()

---------------------------------------------------------------------------

...