Skip to content

Commit

Permalink
Fix 1515 (#1516)
Browse files Browse the repository at this point in the history
<!--Please ensure the PR fulfills the following requirements! -->
<!-- If this is your first PR, make sure to add your details to the
AUTHORS.rst! -->
### Pull Request Checklist:
- [x] This PR addresses an already opened issue (for bug fixes /
features)
    - This PR fixes #1515 
- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] (If applicable) Documentation has been added / updated (for bug
fixes / features)
- [x] CHANGES.rst has been updated (with summary of main changes)
- [ ] Link to issue (:issue:`number`) and pull request (:pull:`number`)
has been added

### What kind of change does this PR introduce?

* fixes issue #1515 

### Does this PR introduce a breaking change?


### Other information:
  • Loading branch information
juliettelavoie authored Nov 1, 2023
2 parents 313eca1 + 27369bf commit 3cb865e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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`).
Expand Down
2 changes: 1 addition & 1 deletion xclim/sdba/_adjustment.py
Original file line number Diff line number Diff line change
Expand Up @@ -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={
Expand Down

0 comments on commit 3cb865e

Please sign in to comment.