DASDAE / dascore

A python library for distributed fiber optic sensing
Other
71 stars 16 forks source link

Attrs.update(coord=...) doesnt update dims #366

Closed d-chambers closed 4 months ago

d-chambers commented 4 months ago

Description

Using PatchAttrs.update and passing a CoordinateManager instance doesn't update the dims attribute.

Example

Expected behavior

import dascore as dc

random_patch = dc.get_example_patch()
attrs = random_patch.attrs
new_patch = random_patch.rename_coords(distance="channel")
new = attrs.update(coords=new_patch.coords)

assert new.dim_tuple == new_patch.dims  # this fails

Versions