Skip to content

Hazforecast squeeze fix - #1362

Merged
peanutfun merged 5 commits into
developfrom
hazforecast_squeeze_fix
Dec 2, 2026
Merged

peanutfun merged 5 commits into
developfrom
hazforecast_squeeze_fix

Conversation

@luseverin

@luseverin luseverin commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

Changes proposed in this PR:

  • HazardForecast.from_xarray_raster now only squeezes dimensions that have length 1 if they are not the leadtime_var or member_var. This avoids ensemble members or lead time dimensions to be squeezed when they have a length of 1.

This PR fixes #1361

PR Author Checklist

PR Reviewer Checklist

@luseverin
luseverin requested review from peanutfun and removed request for peanutfun November 25, 2026 11:24

@peanutfun peanutfun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks for the bugfix! The test looks good. I have one suggestion for improving readability. Could you also add an entry to the changelog?

Comment thread climada/hazard/forecast.py Resolved
luseverin and others added 3 commits December 1, 2026 14:35
Co-authored-by: Lukas Riedel <34276446+peanutfun@users.noreply.github.com>
@luseverin

Copy link
Copy Markdown
Collaborator Author

I have incorporated your suggestion and updated the changelog, please let me know if we can merge.

@peanutfun peanutfun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update. I'll merge! 🎉

@peanutfun
peanutfun merged commit c88dbea into develop Dec 2, 2026
10 of 12 checks passed
@luseverin
luseverin deleted the hazforecast_squeeze_fix branch December 2, 2026 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants