diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 265a95e..8bba03e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -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 diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 75752cc..d8bb12a 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -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 }} diff --git a/src/pycea/tl/distance.py b/src/pycea/tl/distance.py index 7bd8438..718bfc2 100755 --- a/src/pycea/tl/distance.py +++ b/src/pycea/tl/distance.py @@ -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: