Skip to content

Commit

Permalink
fix for numpy 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
yzhao062 committed Jul 7, 2024
1 parent 2dd66fc commit 899d326
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyod/models/rod.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def euclidean(v1, v2, c=False):
res.append([np.sqrt((_v[0] - v2[0]) ** 2 +
(_v[1] - v2[1]) ** 2 +
(_v[2] - v2[2]) ** 2)])
return np.array(res, copy=False)
return np.asarray(res)
return np.sqrt((v1[0] - v2[0]) ** 2 +
(v1[1] - v2[1]) ** 2 +
(v1[2] - v2[2]) ** 2)
Expand Down

0 comments on commit 899d326

Please sign in to comment.