Skip to content

Commit

Permalink
Fix windows numpy 2 change
Browse files Browse the repository at this point in the history
  • Loading branch information
rly authored Nov 26, 2024
1 parent 527871f commit 0ea5510
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/unit_tests/test_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from unittest import TestCase

import numpy as np
from numpy.lib import NumpyVersion
from hdmf.common import DynamicTable, DynamicTableRegion
from pynwb.file import Device, ElectrodeGroup, ElectrodeTable, TimeIntervals, Units

Expand Down Expand Up @@ -187,7 +188,8 @@ def test_binary_int_fail(self):
self.table.add_column(name="test_col", description="")
for x in [1, 0, 1, 0, 1]:
self.table.add_row(test_col=x)
if platform.system() == "Windows":
# the default numpy int in Windows with NumPy < 2 is int32. otherwise it is int64.
if platform.system() == "Windows" and NumpyVersion(np.__version__) < '2.0.0':
platform_saved_bytes = "15.00B"
else:
platform_saved_bytes = "35.00B"
Expand Down

0 comments on commit 0ea5510

Please sign in to comment.