get_axis

function of dascore.proc.coords source

get_axis(
    self: Patch ,
    dim: str ,
)-> ‘int’

Get the axis corresponding to a Patch dimension. Raise error if not found.

Parameters

Parameter Description
self The Patch object.
dim The dimension name.

Examples

import dascore as dc
patch = dc.get_example_patch()

axis = patch.get_axis("time")
assert axis == patch.get_axis("time")