Skip to content

Commit 3e55d2d

Browse files
Fixup numpy bool deprecation
1 parent eb5c3de commit 3e55d2d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

trsfile/traceparameter.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from io import BytesIO
88
from typing import Any
99

10-
import numpy
1110
from numpy import ndarray, integer, uint8, double, single
1211

1312
from trsfile.utils import encode_as_short, read_short
@@ -97,7 +96,7 @@ def _has_expected_type(value: Any) -> bool:
9796
if type(value) is list:
9897
return all(isinstance(elem, bool) for elem in value)
9998
elif type(value) is ndarray:
100-
return all(isinstance(elem, numpy.bool) for elem in value)
99+
return value.dtype == bool
101100
return False
102101

103102

0 commit comments

Comments
 (0)