From e9c166b3dc3102ccdf14c80a20edb3bede42cca6 Mon Sep 17 00:00:00 2001 From: Daniel Ward Date: Sat, 21 Feb 2026 13:32:56 +0000 Subject: [PATCH] Restrict versions to fix arraylike issue. --- .github/workflows/test.yml | 6 +++++- flowjax/utils.py | 2 +- pyproject.toml | 10 +++++----- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 14dd2c66..52f39c03 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,11 +14,15 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 10 + strategy: + matrix: + python-version: ["3.11", "3.x"] + steps: - uses: actions/checkout@v6 - uses: actions/setup-python@v6 with: - python-version: "3.x" + python-version: ${{ matrix.python-version }} - name: Install dependencies run: | diff --git a/flowjax/utils.py b/flowjax/utils.py index 7a3973c7..9c417daa 100644 --- a/flowjax/utils.py +++ b/flowjax/utils.py @@ -103,7 +103,7 @@ def arraylike_to_array( err_name: Name of the input in the error message. Defaults to "input". **kwargs: Keyword arguments passed to jnp.asarray. """ - if not isinstance(arr, ArrayLike): + if not eqx.is_array_like(arr): raise TypeError( f"Expected {err_name} to be arraylike; got {type(arr).__name__}.", ) diff --git a/pyproject.toml b/pyproject.toml index 63f39c24..b92f73a2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,8 +10,8 @@ classifiers = [ "Topic :: Scientific/Engineering :: Mathematics", ] dependencies = [ - "jax>=0.4.16", - "equinox>=0.10", + "jax>=0.7.0", + "equinox>=0.11", "jaxtyping", "tqdm", "optax", @@ -23,8 +23,8 @@ keywords = ["jax", "neural-networks", "equinox"] license = { file = "LICENSE" } name = "flowjax" readme = "README.md" -requires-python = ">=3.10" -version = "19.0.0" +requires-python = ">=3.11" +version = "19.1.0" [project.urls] repository = "https://github.com/danielward27/flowjax" @@ -35,7 +35,7 @@ dev = [ "pytest", "beartype", "ruff", - "sphinx <8.2", # TODO due to https://github.com/tox-dev/sphinx-autodoc-typehints/issues/523 + "sphinx", "sphinx-book-theme", "sphinx-copybutton", "sphinx-autodoc-typehints",