check_len#

pybrops.core.error.error_value_python.check_len(v, vname, vlen)[source]#

Check if an object has a length equal to a provided value. Raise error if object length is not equal to provided value.

Parameters:
  • v (object) – Any Python object

  • vname (str) – Name of the Python object for use in the error message.

  • vlen (int) – Expected length of the Python object.

Return type:

None