Skip to content

Commit d804302

Browse files
Bugfixes, new release (0.4.2) (#66)
* Copy lon values before modifying in-place * Update changelog * Bump version number * Update changelog, release date
1 parent 373bd2a commit d804302

3 files changed

Lines changed: 11 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/).
66

7+
## 0.4.2 (2026-01-28)
8+
9+
New contributors:
10+
- [@tdickinson29](https://github.com/tdickinson29)
11+
12+
Fixed:
13+
- When validating input with a source dataset, use the passed `time_dim` argument ([#62](https://github.com/xarray-contrib/xarray-regrid/pull/62)).
14+
- Fixed issue with lon values being immutable, thanks @shenyulu ([#65](https://github.com/xarray-contrib/xarray-regrid/issues/65), [#66](https://github.com/xarray-contrib/xarray-regrid/pull/66)).
15+
716
## 0.4.1 (2025-04-08)
817

918
Fixed:

src/xarray_regrid/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
"methods",
1010
]
1111

12-
__version__ = "0.4.1"
12+
__version__ = "0.4.2"

src/xarray_regrid/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ def format_lon(
379379
left_pad = int(np.ceil(np.max([left_pad, 0])))
380380
right_pad = int(np.ceil(np.max([right_pad, 0])))
381381
obj = obj.pad({lon_coord: (left_pad, right_pad)}, mode="wrap", keep_attrs=True)
382-
lon_vals = obj.coords[lon_coord].values
382+
lon_vals = obj.coords[lon_coord].values.copy()
383383
if left_pad:
384384
lon_vals[:left_pad] = source_lon.values[-left_pad:] - 360
385385
if right_pad:

0 commit comments

Comments
 (0)