File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -269,7 +269,8 @@ def is_correct_format(cls, fileobj):
269269 def _default_structarr (cls ):
270270 """ Return an empty compliant TRK header as numpy structured array
271271 """
272- st_arr = np .zeros ((), dtype = header_2_dtype )
272+ # Enforce little-endian byte order for header
273+ st_arr = np .zeros ((), dtype = header_2_dtype ).newbyteorder ('<' )
273274
274275 # Default values
275276 st_arr [Field .MAGIC_NUMBER ] = cls .MAGIC_NUMBER
@@ -395,8 +396,7 @@ def save(self, fileobj):
395396 pointing to TRK file (and ready to write from the beginning
396397 of the TRK header data).
397398 """
398- # Enforce little-endian byte order for header
399- header = self ._default_structarr ().newbyteorder ('<' )
399+ header = self ._default_structarr ()
400400
401401 # Override hdr's fields by those contained in `header`.
402402 for k , v in self .header .items ():
You can’t perform that action at this time.
0 commit comments