Repository navigation
Removing variable attributes
filter_cdf(variable_attributes=...) keeps the variable attributes that match, like attributes= does for global ones.
- Names or a pattern apply to every variable.
- A function gets the variable and the attribute, to target one variable.
- With
add_attribute, it renames an attribute:
frame = cdf["B"].attributes["Frame"]
new = cdf.filter(variable_attributes=lambda v, a: not (v.name == "B" and a.name == "Frame"))
new["B"].add_attribute("FRAME", frame.value, frame.type())Held variables and attributes stay valid
A variable or attribute held from Python now stays valid when other entries are added or removed. Before, it could read freed memory, or another entry, and crash.
- Removing a variable or an attribute keeps the order of the others. It used to move the last one into its place, which also changed the order in saved files.
- Only a wrapper of the removed entry itself dangles.
CI
A stalled download of the test corpus no longer hangs a job: downloads and wheel tests time out.