Skip to content

Conversation

@davidhassell
Copy link
Collaborator

Fixes #764

  • Fix bug in cf.aggregate that caused a failure when properties are numpy arrays with two or more elements
  • Fix bug in cf.aggregate that didn't correctly handle the "actual_range" CF attribute

Note

The _equals method can cope with string-valued arguments, so we can simplify the block of code in which it appears

@davidhassell davidhassell added bug Something isn't working aggregation Rerlating to metadata-based field and domain aggregation labels Apr 23, 2024
@davidhassell davidhassell added this to the 3.16.2 milestone Apr 23, 2024
Copy link
Member

@sadielbartholomew sadielbartholomew left a comment

Choose a reason for hiding this comment

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

Fixes the issue at hand, with good coverage from new testing to expose the bugs (added tests fail on main in the same manner as the bug report, which is always a good sign). I have minor comments but happy overall so merge when ready.

davidhassell and others added 5 commits April 25, 2024 11:48
Co-authored-by: Sadie L. Bartholomew <sadie.bartholomew@ncas.ac.uk>
Co-authored-by: Sadie L. Bartholomew <sadie.bartholomew@ncas.ac.uk>
Co-authored-by: Sadie L. Bartholomew <sadie.bartholomew@ncas.ac.uk>
Co-authored-by: Sadie L. Bartholomew <sadie.bartholomew@ncas.ac.uk>
@davidhassell davidhassell merged commit e1af68d into NCAS-CMS:main Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

aggregation Rerlating to metadata-based field and domain aggregation bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Aggregate crashes when fields contain the actual_range attribute

2 participants