to_patch

method of dascore.core.patch.Patch source

to_patch(
    self ,
    data ,
)-> ‘Patch’

Return this patch holding data instead of its own.

What PatchMeta.to_patch means for something which already has data, and the same as new(data=...).

Examples

import dascore as dc
patch = dc.get_example_patch()
assert patch.to_patch(patch.data * 2).shape == patch.shape