Skip to content

cf.aggregate fails when a datum or coordinate conversion parameter has an array value #230

@davidhassell

Description

@davidhassell

At v3.10.0 cf.aggregate fails when a datum or coordinate conversion parameter has an array value.

In this case, the cf.CorodinateReference.structural_signature() cantains a f.Data object with more than one value, which leads to problems when the structural signature is used (as part of) d dictionary key:

ValueError: The truth value of Data with more than one element is ambiguous. Use d.any() or d.all()

A fix is to replace the cf.Data in the structural signature with a python scalar or tuple (of tuples) thereof.

Thanks to @ThibHlln for finding this bug.

Metadata

Metadata

Assignees

Labels

aggregationRerlating to metadata-based field and domain aggregationbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions