Skip to content

Commit 4e22f9b

Browse files
committed
Updated warning message
1 parent 92bb02a commit 4e22f9b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

pgvector/bit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def __init__(self, value):
1717
if value.dtype != np.bool:
1818
# skip warning for result of np.unpackbits
1919
if value.dtype != np.uint8 or np.any(value > 1):
20-
warn('expected elements to be boolean', stacklevel=2)
20+
warn('elements should be boolean', stacklevel=2)
2121
value = value.astype(bool)
2222

2323
if value.ndim != 1:

tests/test_bit.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ def test_list(self):
88
assert Bit([True, False, True]).to_list() == [True, False, True]
99

1010
def test_list_none(self):
11-
with pytest.warns(UserWarning, match='expected elements to be boolean'):
11+
with pytest.warns(UserWarning, match='elements should be boolean'):
1212
assert Bit([True, None, True]).to_text() == '101'
1313

1414
def test_list_int(self):
15-
with pytest.warns(UserWarning, match='expected elements to be boolean'):
15+
with pytest.warns(UserWarning, match='elements should be boolean'):
1616
assert Bit([254, 7, 0]).to_text() == '110'
1717

1818
def test_tuple(self):
@@ -36,12 +36,12 @@ def test_ndarray_unpackbits(self):
3636

3737
def test_ndarray_uint8(self):
3838
arr = np.array([254, 7, 0], dtype=np.uint8)
39-
with pytest.warns(UserWarning, match='expected elements to be boolean'):
39+
with pytest.warns(UserWarning, match='elements should be boolean'):
4040
assert Bit(arr).to_text() == '110'
4141

4242
def test_ndarray_uint16(self):
4343
arr = np.array([254, 7, 0], dtype=np.uint16)
44-
with pytest.warns(UserWarning, match='expected elements to be boolean'):
44+
with pytest.warns(UserWarning, match='elements should be boolean'):
4545
assert Bit(arr).to_text() == '110'
4646

4747
def test_ndim_two(self):

0 commit comments

Comments
 (0)