arr (array_like) – Object to validate.
arr_name (str) – A name/descriptor of the object to validate.
Usually, this is the name of an object attribute
to which the array is meant to be set.
dim (int) – Required dimension of the array-like object.
valid_types (set[type]) – Allowable type(s) for each entry of the array.
valid_type_desc (str or None, optional) – Descriptor for the allowable types.
required_shape (list or None, optional) – Specification of the length of the array in each dimension.
If None is provided, no specifications are imposed.
If a list is provided, then each entry of the list must be
an int specifying the required length in the dimension
corresponding to the position of the entry
or None (meaning no requirement for the length in the
corresponding dimension).
required_shape_qual (str, optional) – Clause/phrase expressing reason arr should be of shape
required_shape, e.g. “to match the set dimension”.