check_sampling

menpofit.checks.check_sampling(sampling, n_scales)[source]

Function that checks the value of a sampling parameter defined for multiple scales. It must be int or ndarray or list of those.

Parameters:
  • sampling (int or ndarray or list of those) – The value to check.
  • n_scales (int) – The number of scales.
Returns:

sampling (list of int or ndarray) – The list of values per scale.

Raises:
  • ValueError – A sampling list can only contain 1 element or {n_scales} elements
  • ValueError – sampling can be an integer or ndarray, a integer or ndarray list containing 1 or {n_scales} elements or None