Skip to content

Commit

Permalink
fix numpy2 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
kif committed Mar 25, 2024
1 parent cf47334 commit bb45d6c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/fabio/OXDimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ def dec_TY5(self, stream):
dim2 = self._shape[0]
while pos_inp < stream_size and pos_out < array_size:
if pos_out % dim2 == 0:
last = 0
last = numpy.int64(0)
else:
last = current
value = raw[pos_inp]
Expand Down
2 changes: 1 addition & 1 deletion src/fabio/test/codecs/test_esperantoimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def test_data(self):
def test_values(self):
esp = fabio.open(UtilsTest.getimage("reference.esperanto.bz2")[:-4])
npy = fabio.open(UtilsTest.getimage("reference.npy.bz2")[:-4])
self.assertEqual(numpy.alltrue(esp.data == npy.data), True, "Images are the same")
self.assertEqual(numpy.all(esp.data == npy.data), True, "Images are the same")


def suite():
Expand Down

0 comments on commit bb45d6c

Please sign in to comment.