Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ packages =
trsfile.engine
trsfile.converters
install_requires =
numpy>=1,<2
numpy>=2
include_package_data = True

[options.extras_require]
Expand Down
5 changes: 3 additions & 2 deletions tests/test_parameter.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from io import BytesIO
from unittest import TestCase

from numpy import ndarray, int16, array, int32, int64, single, double, uint8, int8, uint16, bool8
from numpy import ndarray, int16, array, int32, int64, single, double, uint8, int8, uint16
from numpy import bool as bool8

from trsfile.traceparameter import BooleanArrayParameter, ByteArrayParameter, DoubleArrayParameter, FloatArrayParameter, \
IntegerArrayParameter, ShortArrayParameter, LongArrayParameter, StringParameter
Expand Down Expand Up @@ -47,7 +48,7 @@ def test_byte_parameter(self):
ByteArrayParameter([0, '1'])
with self.assertRaises(TypeError):
ByteArrayParameter([bytes([0, 1, 2, 3]), bytes([4, 5, 6, 7])])
with self.assertRaises(TypeError):
with self.assertRaises(OverflowError):
ByteArrayParameter(ndarray(shape=[16], dtype=int8, buffer=array([int8(val) for val in int_data])))
with self.assertRaises(TypeError):
ByteArrayParameter(ndarray(shape=[16], dtype=uint16, buffer=array([uint16(val) for val in int_data])))
Expand Down
3 changes: 2 additions & 1 deletion trsfile/traceparameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
from io import BytesIO
from typing import Any

from numpy import ndarray, integer, bool8, uint8, double, single
from numpy import ndarray, integer, uint8, double, single
from numpy import bool as bool8

from trsfile.utils import encode_as_short, read_short

Expand Down
Loading