Skip to content

Commit

Permalink
♻️ refactor(zeroth): replace next-iter with zeroth
Browse files Browse the repository at this point in the history
Signed-off-by: Nathaniel Starkman <[email protected]>
  • Loading branch information
nstarman committed Jan 25, 2025
1 parent 5aba0b7 commit b9d67be
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
"xmmutablemap>=0.1",
"zeroth>=1.0.0",
]
# NOTE: zeroth is only required for matplotlib

[project.optional-dependencies]
# jax extras
Expand Down Expand Up @@ -230,6 +229,7 @@ UNXT_ENABLE_RUNTIME_TYPECHECKING = "beartype.beartype"
"optional_dependencies",
"quaxed",
"xmmutablemap",
"zeroth",
]
known-local-folder = ["unxt"]

Expand Down
1 change: 1 addition & 0 deletions src/unxt/_interop/unxt_interop_mpl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion src/unxt/_src/unitsystems/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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


Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b9d67be

Please sign in to comment.