Skip to content

Commit

Permalink
fix numpy cast conversion deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
cbespin committed May 21, 2024
1 parent 52447b3 commit 216279a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/mio_sram_test/tests/test_Sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def test_overflow(self):
self.chip['PULSE'].start()

ret = self.chip['FIFO'].get_data()
x = np.arange((128 + 1023) * 4, (128 + 1023 + 1) * 4, dtype=np.uint8)
x = np.arange((128 + 1023) * 4, (128 + 1023 + 1) * 4).astype(np.uint8)
x.dtype = np.uint32

np.testing.assert_array_equal(ret, x)
Expand Down Expand Up @@ -197,12 +197,12 @@ def test_continouse(self):
for _ in range(100):
ret = self.chip['FIFO'].get_data()

x = np.arange(i * 4, (i + ret.shape[0]) * 4, dtype=np.uint8)
x = np.arange(i * 4, (i + ret.shape[0]) * 4).astype(np.uint8)
x.dtype = np.uint32

i += ret.shape[0]

ok = np.alltrue(ret == x)
ok = np.all(ret == x)
# print 'OK?', ok, ret.shape[0], i, k
if not ok:
error = True
Expand Down

0 comments on commit 216279a

Please sign in to comment.