Skip to content

Commit

Permalink
Merge pull request #101 from IMMM-SFA/feature/fix_indexing_in_numpy_t…
Browse files Browse the repository at this point in the history
…o_binary

fix indexing in numpy_to_binary()
  • Loading branch information
levisweetbreu authored Nov 3, 2023
2 parents d996008 + 18f22c5 commit 2f9e4cf
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions naturf/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1278,9 +1278,7 @@ def numpy_to_binary(raster_to_numpy: np.ndarray) -> bytes:
master_outi = bytes()
for j in range(len(raster_to_numpy[i])):
for k in range(len(raster_to_numpy[i][j])):
master_outi += struct.pack(
">i", int(raster_to_numpy[i][len(raster_to_numpy[i]) - j - 1][k])
)
master_outi += struct.pack(">i", int(raster_to_numpy[i][j][k]))
master_out.append(master_outi)

master_out_final = bytes()
Expand Down

0 comments on commit 2f9e4cf

Please sign in to comment.