From d6676537f55f19816367a22180f9dc98a35e4911 Mon Sep 17 00:00:00 2001 From: Will Ayd Date: Fri, 17 Nov 2023 16:12:56 -0500 Subject: [PATCH] fix comparisons --- pandas/_libs/lib.pyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/_libs/lib.pyx b/pandas/_libs/lib.pyx index 0aeeec06fad07..42b5c18f3d444 100644 --- a/pandas/_libs/lib.pyx +++ b/pandas/_libs/lib.pyx @@ -1917,7 +1917,7 @@ cdef class StringValidator(Validator): return isinstance(value, str) cdef bint is_array_typed(self) except -1: - return self.dtype.type == cnp.NPY_UNICODE + return self.dtype.type_num == cnp.NPY_UNICODE cpdef bint is_string_array(ndarray values, bint skipna=False): @@ -1934,7 +1934,7 @@ cdef class BytesValidator(Validator): return isinstance(value, bytes) cdef bint is_array_typed(self) except -1: - return self.dtype.type == cnp.NPY_STRING + return self.dtype.type_num == cnp.NPY_STRING cdef bint is_bytes_array(ndarray values, bint skipna=False):