diff --git a/CHANGES.rst b/CHANGES.rst index 30de3b8c8..c1ed02867 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,14 @@ Changelog ========= +v0.47.0 (unreleased) +-------------------- +Contributors to this version: Juliette Lavoie (:user:`juliettelavoie`) + +Bug fixes +^^^^^^^^^ +* Fixed a bug with ``n_escore=-1`` in ``xclim.sdba.adjustment.NpdfTransform`` (:issue:`1515`, :pull:`1515`). + v0.46.0 (2023-10-24) -------------------- Contributors to this version: David Huard (:user:`huard`), Trevor James Smith (:user:`Zeitsperre`), Pascal Bourgault (:user:`aulemahal`), Éric Dupuis (:user:`coxipi`). diff --git a/xclim/sdba/_adjustment.py b/xclim/sdba/_adjustment.py index a28f9c03a..5a651a7ea 100644 --- a/xclim/sdba/_adjustment.py +++ b/xclim/sdba/_adjustment.py @@ -309,7 +309,7 @@ def npdf_transform(ds: xr.Dataset, **kwargs) -> xr.Dataset: # All NaN, but with the proper shape. escores = ( ref.isel({dim: 0, "time": 0}) * hist.isel({dim: 0, "time": 0}) - ).expand_dims(iterations=ds.iteration) * np.NaN + ).expand_dims(iterations=ds.iterations) * np.NaN return xr.Dataset( data_vars={