drop_data

method of dascore.core.patch.Patch source

drop_data(
    self ,
)-> ‘PatchMeta’

Return this patch’s metadata, without its data.

The result keeps the coords, attrs and dtype, so it still describes the data. The inverse of to_patch, which gives a description its data back.

Examples

import dascore as dc
patch = dc.get_example_patch()
described = patch.drop_data()
assert described.shape == patch.shape
assert described.dtype == patch.dtype
assert described.to_patch(patch.data).equals(patch)