check_two_column_format#
- PySeismoSoil.helper_generic.check_two_column_format(something: Any, name: str | None = None, *, ensure_non_negative: bool = False, at_least_two_columns: bool = False) None[source]#
Check that
somethingis a 2D numpy array with two columns.Raises an error if
somethingis the wrong format.- Parameters:
something (Any) – Any Python object.
name (str | None, default=None) – The name of
somethingto be displayed in the potential error message.ensure_non_negative (bool, default=False) – Whether to ensure that all values in
something>= 0.at_least_two_columns (bool, default=False) – Whether to relax the constraints to from “exactly 2 columns” to “at least two columns”.
- Raises:
TypeError – When the input has unexpected type
ValueError – When the input has unexpected value