-
Notifications
You must be signed in to change notification settings - Fork 23
Closed
Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
It would be useful to allow cf.unique_constructs
to ignore selected properties when assessing equality of input constructs. For example, two Field
constructs may differ only by a timestamp within their "history" properties, and this may be of no concern. This would look like:
>>> import cf
>>> f = cf.example_field(0)
>>> f2 = f.copy()
>>> f.set_property('foo', 'bar')
>>> f2.set_property('foo', 'bar2')
>>> cf.unique_constructs([f, f2])
[<Field: specific_humidity(latitude(5), longitude(8)) 1>,
<Field: specific_humidity(latitude(5), longitude(8)) 1>]
>>> cf.unique_constructs([f, f2], ignore_properties='foo')
[<Field: specific_humidity(latitude(5), longitude(8)) 1>]
bewithankit
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request