feat(compatibility): Python3.7 compatibility
This commit is contained in:
parent
7f0a8e9bce
commit
083b5c1597
@ -4,6 +4,7 @@ language: python
|
||||
python:
|
||||
- 3.9
|
||||
- 3.8
|
||||
- 3.7
|
||||
cache:
|
||||
directories:
|
||||
- "$HOME/.cache/pip"
|
||||
|
@ -41,9 +41,6 @@ def euclidean_distance_v2(x, y):
|
||||
# batch diagonal. See:
|
||||
# https://pytorch.org/docs/stable/generated/torch.diagonal.html
|
||||
distances = torch.diagonal(pairwise_distances, dim1=-2, dim2=-1)
|
||||
# print(f"{diff.shape=}") # (nx, ny, ndim)
|
||||
# print(f"{pairwise_distances.shape=}") # (nx, ny, ny)
|
||||
# print(f"{distances.shape=}") # (nx, ny)
|
||||
return distances
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user