iris icon indicating copy to clipboard operation
iris copied to clipboard

Add option to specify chunks in `iris.util.broadcast_to_shape`

Open bouweandela opened this issue 1 year ago • 4 comments

🚀 Pull Request

Description

Make it possible to specify the target chunks in iris.util.broadcast_to_shape.

This function is often used to broadcast auxiliary coordinate or cell measure data or weights to the same shape as the data from a cube. If the chunks of the broadcasted data do not match that of the cube, this leads to poor computational performance. Rechunking after broadcasting is less efficient, therefore it is really useful to be able to specify the chunks directly as part of the broadcast.

Closes #5456


Consult Iris pull request check list

bouweandela avatar Dec 11 '23 09:12 bouweandela

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 89.76%. Comparing base (fa07442) to head (f12a80c). Report is 105 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5620      +/-   ##
==========================================
+ Coverage   89.69%   89.76%   +0.07%     
==========================================
  Files          90       93       +3     
  Lines       22809    22990     +181     
  Branches     5440     5010     -430     
==========================================
+ Hits        20458    20638     +180     
- Misses       1618     1622       +4     
+ Partials      733      730       -3     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Dec 11 '23 09:12 codecov[bot]

It looks like the link check is failing because of the use of http:// instead of https://. I opened #5621 to see if I can fix this.

bouweandela avatar Dec 11 '23 10:12 bouweandela

@pp-mo any update on this?

trexfeathers avatar Jan 22 '24 09:01 trexfeathers

@pp-mo any update on this?

Sorry yes I am reviewing this, I have some queries + suggestions pending . I has taken me quite a while to get my head around it -- should finally get to posting later today I think !

pp-mo avatar Jan 22 '24 10:01 pp-mo