check_multi_scale_param

menpofit.checks.check_multi_scale_param(n_scales, types, param_name, param)[source]

General function for checking a parameter defined for multiple scales. It raises an error if the parameter is not an iterable with the correct size and correct types.

Parameters
  • n_scales (int) – The number of scales.

  • types (tuple) – The tuple of variable types that the parameter is allowed to have.

  • param_name (str) – The name of the parameter.

  • param (types) – The parameter value.

Returns

param (list of types) – The list of values per scale.

Raises

ValueError – {param_name} must be in {types} or a list/tuple of {types} with the same length as the number of scales