Skip to content

Commit b129406

Browse files
Fixup numpy bool deprecation
1 parent eb5c3de commit b129406

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

trsfile/traceparameter.py

Lines changed: 1 addition & 4 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
@@ -94,10 +93,8 @@ def serialize(self) -> bytes:
9493

9594
@staticmethod
9695
def _has_expected_type(value: Any) -> bool:
97-
if type(value) is list:
96+
if isinstance(value, (list, ndarray)):
9897
return all(isinstance(elem, bool) for elem in value)
99-
elif type(value) is ndarray:
100-
return all(isinstance(elem, numpy.bool) for elem in value)
10198
return False
10299

103100

0 commit comments

Comments
 (0)