assert_array_length#

PySeismoSoil.helper_generic.assert_array_length(something: Any, length: int | None, name: str = '`something`') None[source]#

Assert that something is a 1D of length length.

Parameters:
  • something (Any) – Any Python object

  • length (int | None) – The length that something must have.

  • name (str) – The name of something for displaying the error message, if necessary.

Raises:

ValueError – When the length of something is not the same as length