From 2b4f68cbd32b10527dfe1b4a498f64198853e280 Mon Sep 17 00:00:00 2001 From: Martin Schubert Date: Fri, 23 Feb 2024 09:10:13 -0800 Subject: [PATCH 1/2] Fix compile time scope --- src/totypes/types.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/totypes/types.py b/src/totypes/types.py index 4feade4..f17c57e 100644 --- a/src/totypes/types.py +++ b/src/totypes/types.py @@ -66,9 +66,9 @@ def __post_init__(self) -> None: ) if self.upper_bound is not None and self.lower_bound is not None: - invalid_bounds = self.lower_bound >= self.upper_bound - is_array = isinstance(invalid_bounds, (jnp.ndarray, onp.ndarray)) with jax.ensure_compile_time_eval(): + invalid_bounds = self.lower_bound >= self.upper_bound + is_array = isinstance(invalid_bounds, (jnp.ndarray, onp.ndarray)) if ( is_array and invalid_bounds.any() # type: ignore[union-attr] From d8d02641d65bc6f911e942e962b465740c533276 Mon Sep 17 00:00:00 2001 From: Martin Schubert Date: Fri, 23 Feb 2024 09:11:36 -0800 Subject: [PATCH 2/2] Version updated from v0.6.2 to v0.6.3 --- .bumpversion.toml | 2 +- README.md | 2 +- pyproject.toml | 2 +- src/totypes/__init__.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.bumpversion.toml b/.bumpversion.toml index b0109fd..b5f2fb9 100644 --- a/.bumpversion.toml +++ b/.bumpversion.toml @@ -1,5 +1,5 @@ [tool.bumpversion] -current_version = "v0.6.2" +current_version = "v0.6.3" commit = true commit_args = "--no-verify" tag = true diff --git a/README.md b/README.md index 8363d46..1b4b1e6 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # totypes - Custom types for topology optimization -`v0.6.2` +`v0.6.3` ## Overview diff --git a/pyproject.toml b/pyproject.toml index 72683f5..06ca471 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "totypes" -version = "v0.6.2" +version = "v0.6.3" description = "Custom datatypes useful in a topology optimization context" keywords = ["topology", "optimization", "jax", "inverse design"] readme = "README.md" diff --git a/src/totypes/__init__.py b/src/totypes/__init__.py index 44359ff..2400235 100644 --- a/src/totypes/__init__.py +++ b/src/totypes/__init__.py @@ -3,7 +3,7 @@ Copyright (c) 2023 The INVRS-IO authors. """ -__version__ = "v0.6.2" +__version__ = "v0.6.3" __author__ = "Martin F. Schubert " __all__ = ["json_utils", "symmetry", "types"]