Z is an (n, 2) array of coordinates. Return the (n, n) matrix of pairwise Euclidean distances.
Z
(n, 2)
(n, n)
Input
[[0. 0.] [3. 4.] [6. 8.]]
Output
[[ 0. 5. 10.] [ 5. 0. 5.] [10. 5. 0.]]
This one's part of Premium. Unlock the full NumPy track plus every other premium problem on the site.
solve(...)