feat(compatibility): Python3.7 compatibility
This commit is contained in:
parent
7f0a8e9bce
commit
083b5c1597
@ -4,6 +4,7 @@ language: python
|
|||||||
python:
|
python:
|
||||||
- 3.9
|
- 3.9
|
||||||
- 3.8
|
- 3.8
|
||||||
|
- 3.7
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- "$HOME/.cache/pip"
|
- "$HOME/.cache/pip"
|
||||||
|
@ -41,9 +41,6 @@ def euclidean_distance_v2(x, y):
|
|||||||
# batch diagonal. See:
|
# batch diagonal. See:
|
||||||
# https://pytorch.org/docs/stable/generated/torch.diagonal.html
|
# https://pytorch.org/docs/stable/generated/torch.diagonal.html
|
||||||
distances = torch.diagonal(pairwise_distances, dim1=-2, dim2=-1)
|
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
|
return distances
|
||||||
|
|
||||||
|
|
||||||
|
2
setup.py
2
setup.py
@ -59,7 +59,7 @@ setup(
|
|||||||
url=PROJECT_URL,
|
url=PROJECT_URL,
|
||||||
download_url=DOWNLOAD_URL,
|
download_url=DOWNLOAD_URL,
|
||||||
license="MIT",
|
license="MIT",
|
||||||
python_requires=">=3.8",
|
python_requires=">=3.7",
|
||||||
install_requires=INSTALL_REQUIRES,
|
install_requires=INSTALL_REQUIRES,
|
||||||
extras_require={
|
extras_require={
|
||||||
"datasets": DATASETS,
|
"datasets": DATASETS,
|
||||||
|
Loading…
Reference in New Issue
Block a user