Skip to content

Commit

Permalink
Fix comment
Browse files Browse the repository at this point in the history
  • Loading branch information
allen-adastra committed Sep 30, 2024
1 parent 9b4bf23 commit 5d01fa3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions xarray_jax/register_pytrees.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
import contextvars

VarChangeFn = Callable[[xarray.Variable], xarray.Variable]
_VAR_CHANGE_ON_UNFLATTEN_FN: contextvars.ContextVar[VarChangeFn] = (
contextvars.ContextVar("var_change_on_unflatten_fn")
)
_VAR_CHANGE_ON_UNFLATTEN_FN: contextvars.ContextVar[
VarChangeFn
] = contextvars.ContextVar("var_change_on_unflatten_fn")


@contextlib.contextmanager
Expand All @@ -27,7 +27,7 @@ def _flatten_variable(
children = (v._data,)
aux = (
v._dims,
# Xarray will sometimes turn None into empty dictionaries. To maintain consistent tree structures, we convert empty dictionaries to None.
# Xarray will sometimes turn None into empty dictionaries. To maintain consistent tree structures, we convert None to empty dictionaries.
# https://github.com/pydata/xarray/issues/9560
{} if v._attrs is None else v._attrs,
)
Expand Down

0 comments on commit 5d01fa3

Please sign in to comment.