Skip to content

Commit

Permalink
Fix reading numeric array data on big-endian hosts (#98)
Browse files Browse the repository at this point in the history
* Fix reading numeric array data on big-endian hosts

* Add changelog entry for PR#98
  • Loading branch information
musicinmybrain committed Jul 18, 2024
1 parent 2fe4b06 commit ca9e580
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
## [UNRELEASED] - YYYY-MM-DD
### Fixed
- Fix reading numeric array data on big-endian hosts ([#98](https://github.com/xdf-modules/pyxdf/pull/98) by [Ben Beasley](https://github.com/musicinmybrain))

## [1.16.7] - 2024-07-17
### Added
Expand Down
4 changes: 3 additions & 1 deletion pyxdf/pyxdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,9 @@ def _read_chunk3(f, s):
f.readinto(raw)
# no fromfile(), see
# https://github.com/numpy/numpy/issues/13319
values[k, :] = np.frombuffer(raw, dtype=s.dtype, count=s.nchns)
values[k, :] = np.frombuffer(
raw, dtype=s.dtype.newbyteorder("<"), count=s.nchns
)
return nsamples, stamps, values


Expand Down

0 comments on commit ca9e580

Please sign in to comment.