update

method of dascore.core.coordmanager.CoordManager source

update(
    self ,
    **kwargs ,
)-> ‘Self’

Update the coordinates, return a new Coordinate Manager.

Input values can be of the same form as initialization. To drop coordinates, simply pass {coord_name: None}

Examples

import dascore as dc
import numpy as np
patch = dc.get_example_patch()
coords = patch.coords

# Update time coordinate
new_time = np.arange(len(coords.get_array('time')))
new_coords = coords.update(time=new_time)
assert 'time' in new_coords