Skip to content

Commit

Permalink
use _util.native_to_byteorder function in ak.from_buffers (#3354)
Browse files Browse the repository at this point in the history
  • Loading branch information
pfackeldey authored Dec 19, 2024
1 parent d5e7493 commit 288851a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/awkward/operations/ak_from_buffers.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,7 @@ def _from_buffer(
return array[:count]
else:
array = nplike.frombuffer(buffer, dtype=dtype, count=count)
if byteorder != ak._util.native_byteorder:
return array.byteswap(inplace=False)
else:
return array
return ak._util.native_to_byteorder(array, byteorder)


def _reconstitute(
Expand Down

0 comments on commit 288851a

Please sign in to comment.