Skip to content

Commit d739a10

Browse files
committed
Sam's feedback
1 parent f6ef862 commit d739a10

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

neo/rawio/intanrawio.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,7 @@ def _parse_header(self):
179179
self._raw_data = np.memmap(self.filename, dtype=memmap_data_dtype, mode="r", offset=header_size)
180180

181181
# for 'one-file-per-signal' we have one memory map / neo stream
182-
# based on https://github.com/NeuralEnsemble/python-neo/issues/1556 and the recommendations on the
183-
# Intan website the data appears to be ordered column-major ('F') rather than row-major ('C') so
184-
# when making our memmaps we should do order='F'
182+
# based on https://github.com/NeuralEnsemble/python-neo/issues/1556 bug in versions 0.13.1, .2, .3
185183
elif self.file_format == "one-file-per-signal":
186184
self._raw_data = {}
187185
for stream_index, (stream_index_key, stream_datatype) in enumerate(memmap_data_dtype.items()):
@@ -191,8 +189,8 @@ def _parse_header(self):
191189
dtype_size = np.dtype(stream_datatype).itemsize
192190
n_samples = size_in_bytes // (dtype_size * num_channels)
193191
signal_stream_memmap = np.memmap(
194-
file_path, dtype=stream_datatype, mode="r", shape=(num_channels, n_samples), order='F',
195-
).T
192+
file_path, dtype=stream_datatype, mode="r", shape=(n_samples, num_channels), order='C',
193+
)
196194
self._raw_data[stream_index] = signal_stream_memmap
197195

198196
# for one-file-per-channel we have one memory map / channel stored as a list / neo stream

0 commit comments

Comments
 (0)