Skip to content

Commit

Permalink
Merge pull request #1310 from hornauerp/master
Browse files Browse the repository at this point in the history
Fixed bug in maxwellrawio.py that shuffled channels
  • Loading branch information
apdavison authored Jul 27, 2023
2 parents 972901f + d97fe0c commit 479c86f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions neo/rawio/maxwellrawio.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,10 @@ def _get_analogsignal_chunk(self, block_index, seg_index, i_start, i_stop,
if np.array(channel_indexes).size > 1 and np.any(np.diff(channel_indexes) < 0):
# get around h5py constraint that it does not allow datasets
# to be indexed out of order
sorted_channel_indexes = np.sort(channel_indexes)
resorted_indexes = np.array(
[list(channel_indexes).index(ch) for ch in sorted_channel_indexes])
order_f = np.argsort(channel_indexes)
sorted_channel_indexes = channel_indexes[order_f]
# use argsort again on order_f to obtain resorted_indexes
resorted_indexes = np.argsort(order_f)

try:
if resorted_indexes is None:
Expand Down

0 comments on commit 479c86f

Please sign in to comment.