Skip to content

Commit

Permalink
switch to new dict union (MESMER-group#482)
Browse files Browse the repository at this point in the history
makes sense after requiring python 3.9+
  • Loading branch information
l-pierini authored Jul 23, 2024
1 parent d8bac96 commit 32969a3
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions mesmer/stats/_auto_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,9 +412,7 @@ def _draw_ar_corr_xr_internal(

dims = (realisation_dim, time_dim, gridpoint_dim)

# TODO: use dict union once requiring py3.9+
# coords = gridpoint_coords | time_coords | realisation_coords
coords = {**time_coords, **realisation_coords, **gridpoint_coords}
coords = gridpoint_coords | time_coords | realisation_coords

out = xr.DataArray(out, dims=dims, coords=coords)

Expand Down Expand Up @@ -889,9 +887,7 @@ def _draw_ar_corr_monthly_xr_internal(

dims = (realisation_dim, time_dim, gridpoint_dim)

# TODO: use dict union once requiring py3.9+
# coords = gridpoint_coords | time_coords | realisation_coords
coords = {**time_coords, **realisation_coords, **gridpoint_coords}
coords = gridpoint_coords | time_coords | realisation_coords

out = xr.DataArray(out, dims=dims, coords=coords)

Expand Down

0 comments on commit 32969a3

Please sign in to comment.