Skip to content

Commit

Permalink
Use np.bool_ instead of np.bool8
Browse files Browse the repository at this point in the history
  • Loading branch information
maffoo committed Sep 2, 2024
1 parent 0adfb75 commit 793d6b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion labrad/test/test_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def compareValueArrays(a, b):
(ValueArray([1.0, 2], ''), np.array([1.0, 2]),
np.testing.assert_array_almost_equal),
# Numpy scalar types
(np.bool8(True), True, None)
(np.bool_(True), True, None)
]
for input, expected, comparison_func in tests:
unflat = T.unflatten(*T.flatten(input))
Expand Down
2 changes: 1 addition & 1 deletion labrad/types/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ def __flatten__(self, b, endianness):
return b'\x01' if b else b'\x00', self

registerType(bool, TBool())
registerType(np.bool8, TBool())
registerType(np.bool_, TBool())

class TInt(Type, Singleton):
"""A signed 32-bit integer."""
Expand Down

0 comments on commit 793d6b6

Please sign in to comment.