get_dim_value_from_kwargs

function of dascore.utils.patch source

get_dim_value_from_kwargs(
    patch ,
    kwargs ,
)

Assert that kwargs contain one value and it is a dimension of patch.

Several patch functions allow passing values via kwargs which are dimension specific. This function allows for some sane validation of such functions.

Return the name of the dimension, its axis position, and its value.