From d9ee617b802e3cb2b11e2a02435248f27ad55996 Mon Sep 17 00:00:00 2001 From: Jiahui Miao <130162274+HUIIIM@users.noreply.github.com> Date: Fri, 2 Oct 2026 00:18:20 -0400 Subject: [PATCH] Fix dtype check for numpy boolean array --- pgvector/bit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pgvector/bit.py b/pgvector/bit.py index 2b04912..dfcf10b 100644 --- a/pgvector/bit.py +++ b/pgvector/bit.py @@ -39,7 +39,7 @@ def __init__( elif is_ndarray(value): import numpy as np - if value.dtype != np.bool: + if value.dtype != np.bool_: # skip error for result of np.unpackbits if value.dtype != np.uint8 or np.any(value > 1): raise ValueError('expected elements to be boolean')