Skip to content

Commit

Permalink
Merge pull request #562 from kif/561_numpy2
Browse files Browse the repository at this point in the history
fix numpy2 compatibility
  • Loading branch information
kif authored Apr 2, 2024
2 parents cf47334 + 981a437 commit 8609115
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.assertTrue(numpy.array_equal(esp.data, npy.data), "Images are the same")


def suite():
Expand Down

0 comments on commit 8609115

Please sign in to comment.