diff --git a/pyproject.toml b/pyproject.toml index da888dea..3bdfb27c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,7 +40,6 @@ "xmmutablemap>=0.1", "zeroth>=1.0.0", ] - # NOTE: zeroth is only required for matplotlib [project.optional-dependencies] # jax extras @@ -230,6 +229,7 @@ UNXT_ENABLE_RUNTIME_TYPECHECKING = "beartype.beartype" "optional_dependencies", "quaxed", "xmmutablemap", + "zeroth", ] known-local-folder = ["unxt"] diff --git a/src/unxt/_interop/unxt_interop_mpl/__init__.py b/src/unxt/_interop/unxt_interop_mpl/__init__.py index fa3117a5..a0f1b913 100644 --- a/src/unxt/_interop/unxt_interop_mpl/__init__.py +++ b/src/unxt/_interop/unxt_interop_mpl/__init__.py @@ -14,6 +14,7 @@ import matplotlib.units from jaxtyping import Array from matplotlib.axes import Axes + from zeroth import zeroth from unxt.quantity import AbstractQuantity, UncheckedQuantity, ustrip diff --git a/src/unxt/_src/unitsystems/utils.py b/src/unxt/_src/unitsystems/utils.py index c9780c68..e82226da 100644 --- a/src/unxt/_src/unitsystems/utils.py +++ b/src/unxt/_src/unitsystems/utils.py @@ -7,6 +7,8 @@ from plum import dispatch +from zeroth import zeroth + from . import builtin_dimensions as bdims from unxt._src.dimensions import AbstractDimension, dimension_of from unxt._src.typing_ext import Unit @@ -73,7 +75,7 @@ def get_dimension_name(pt: AbstractDimension, /) -> str: case bdims.speed: out = "speed" case _: - out = get_dimension_name(next(iter(pt._physical_type))) # noqa: SLF001 + out = get_dimension_name(zeroth(pt._physical_type)) # noqa: SLF001 return out diff --git a/uv.lock b/uv.lock index 51bfd976..e75af93d 100644 --- a/uv.lock +++ b/uv.lock @@ -2627,7 +2627,7 @@ wheels = [ [[package]] name = "unxt" -version = "1.0.1.dev31+gb3530a3.d20250122" +version = "1.0.1.dev33+g5aba0b7.d20250125" source = { editable = "." } dependencies = [ { name = "astropy" },