Skip to content

Commit

Permalink
zip python 3.11 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
colganwi committed Aug 17, 2024
1 parent 4da05b5 commit 76f6db5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.11"
cache: "pip"
cache-dependency-path: "**/pyproject.toml"
- name: Install build dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ jobs:
matrix:
include:
- os: ubuntu-latest
python: "3.9"
python: "3.10"
- os: ubuntu-latest
python: "3.11"
python: "3.12"

name: ${{ matrix.name }} Python ${{ matrix.python }}

Expand Down
2 changes: 1 addition & 1 deletion src/pycea/tl/distance.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def distance(
pairs = _sample_pairs(pairs, sample_n, tdata.n_obs)
# Compute distances
distances = [metric_fn.pairwise(X[i : i + 1, :], X[j : j + 1, :])[0, 0] for i, j in pairs]
distances = sp.sparse.csr_matrix((distances, zip(*pairs)), shape=(tdata.n_obs, tdata.n_obs))
distances = sp.sparse.csr_matrix((distances, tuple(map(list, zip(*pairs)))), shape=(tdata.n_obs, tdata.n_obs))
# Distance given indices
elif obs is None or (isinstance(obs, Sequence) and isinstance(obs[0], str)):
if obs is None:
Expand Down

0 comments on commit 76f6db5

Please sign in to comment.