DASDAE / dascore

A python library for distributed fiber optic sensing
Other
80 stars 17 forks source link

Cant remove units with set_units(None) #349

Closed d-chambers closed 8 months ago

d-chambers commented 8 months ago

Description

patch.set_units should allow units to be removed used None as the argument. Currently this doesn't work.

Example

import dascore as dc

patch = dc.get_example_patch().set_units("m")
new = patch.set_units(None)
assert new.attrs.data_units is None

Expected behavior

The above code should work.

Versions