-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
Calling:
raw, events = raw.resample(128, events=events, npad=10)
Results in the following error:
Traceback (most recent call last):
File "./pyaepsin.py", line 359, in <module>
main(**args)
File "./pyaepsin.py", line 178, in main
raw, events = raw.resample(128, events=events, npad=10)
File "<string>", line 2, in resample
File "/Users/sam/Work/SOTON/Initial_work/TRF_Verification/mne-python/mne/utils.py", line 724, in verbose
return function(*args, **kwargs)
File "/Users/sam/Work/SOTON/Initial_work/TRF_Verification/mne-python/mne/io/base.py", line 1522, in resample
window=window, n_jobs=n_jobs, pad=pad))
File "<string>", line 2, in resample
File "/Users/sam/Work/SOTON/Initial_work/TRF_Verification/mne-python/mne/utils.py", line 724, in verbose
return function(*args, **kwargs)
File "/Users/sam/Work/SOTON/Initial_work/TRF_Verification/mne-python/mne/filter.py", line 1600, in resample
cuda_dict, pad)
ValueError: could not broadcast input array from shape (0) into shape (100224)
Due to incorrect handling of array trimming when trimming the end of the array is 0 samples long in cuda.py (line 378-383):
# now let's trim it back to the correct size (if there was padding)
if (to_removes > 0).any():
keep = np.ones((new_len), dtype='bool')
keep[:to_removes[0]] = False
keep[-to_removes[1]:] = False
y = np.compress(keep, y)
Metadata
Metadata
Assignees
Labels
No labels