utils#
Methods for validating function arguments.
- hsr4hci.utils.check_cartesian_position(position, require_int=False)[source]#
Check if a given
positionrepresents a valid Cartesian position (i.e., is a 2-tuple of floats or integers).- Parameters:
- Returns:
None is
positionis a valid Cartesian position; otherwise, aValueErroris raised.- Return type:
- hsr4hci.utils.check_consistent_size(*arrays, axis=0)[source]#
Check that all
arrayshave a consistent size along the givenaxis. Can be used, for example, to ensure that a givenstackandparanghave the same number of frames.