vocalpy.validators.validators.have_same_dtype#
- vocalpy.validators.validators.have_same_dtype(arr1: ndarray[Any, dtype[_ScalarType_co]], arr2: ndarray[Any, dtype[_ScalarType_co]], name1: str | None = None, name2: str | None = None) bool [source]#
Validates that two arrays,
arr1
andarr2
, have the samedtype
.- Parameters:
- arr1numpy.ndarray
First array to be validated.
- arr2numpy.ndarray
Second array to be validated.
- name1str, optional
Name of first array in calling function. Used in any error message if both
name1
andname2
are supplied.- name2str, optional
Name of second array in calling function. Used in any error message if both
name1
andname2
are supplied.
- Returns:
- have_same_dtypebool
True if
arr1
andarr2
have the samedtype
.