check_dims

function of dascore.utils.patch source

check_dims(
    patch1 ,
    patch2 ,
    check_behavior: Literal[‘warn’, ‘raise’, None] = raise,
    intersection: bool = False,
)-> ‘bool’

Return True if dimensions of two patches are equal.

Parameters

Parameter Description
patch1 first patch
patch2 second patch
check_behavior String with ‘raise’ will raise an error if incompatible,
‘warn’ will provide a warning, None will do nothing.
intersection If True, allow any intersection of dimensions to pass. This is useful
when only broad-castablity needs to be checked. If false require dims
to be equal.