From 8285871a75db2dffebae1df0e031ca2aa6959f2d Mon Sep 17 00:00:00 2001 From: pfackeldey Date: Thu, 19 Dec 2024 13:44:09 -0500 Subject: [PATCH] use --- src/awkward/operations/ak_from_buffers.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/awkward/operations/ak_from_buffers.py b/src/awkward/operations/ak_from_buffers.py index b843c40b3f..1f6e33856d 100644 --- a/src/awkward/operations/ak_from_buffers.py +++ b/src/awkward/operations/ak_from_buffers.py @@ -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(