Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EDF New Channel - ValueError: could not broadcast input array from shape (400) into shape (500) #12

Open
matt-sf opened this issue Jan 15, 2019 · 3 comments

Comments

@matt-sf
Copy link

matt-sf commented Jan 15, 2019

When loading an EDF sleep file, the dataset seems to load correctly. However, when I click Apply after creating a new Channel, I get the following error:

(base) C:\Users\Matthew\Documents\Sleep>wonambi
16:13:32 WONAMBI v5.62
16:13:41 Reading dataset: C:/Users/Matthew/Documents/Sleep/06000656-A5BS04864[EXPORT].edf
Traceback (most recent call last):
File "c:\users\matthew\anaconda3\lib\site-packages\wonambi\widgets\channels.py", line 434, in apply
self.parent.overview.update_position()
File "c:\users\matthew\anaconda3\lib\site-packages\wonambi\widgets\overview.py", line 239, in update_position
self.parent.traces.read_data()
File "c:\users\matthew\anaconda3\lib\site-packages\wonambi\widgets\traces.py", line 344, in read_data
endtime=window_end)
File "c:\users\matthew\anaconda3\lib\site-packages\wonambi\dataset.py", line 367, in read_data
dat = dataset.return_dat(idx_chan, one_begsam, one_endsam)
File "c:\users\matthew\anaconda3\lib\site-packages\wonambi\ioeeg\edf.py", line 201, in return_dat
dat_in_rec = self._read_record(f, blk, chan)
File "c:\users\matthew\anaconda3\lib\site-packages\wonambi\ioeeg\edf.py", line 237, in _read_record
dat_in_rec[i_ch_in_dat, :] = repeat(x, ratio)
ValueError: could not broadcast input array from shape (400) into shape (500)

@matt-sf
Copy link
Author

matt-sf commented Jan 16, 2019

Interestingly, the same dataset loads correctly using the following python project, which appears to be based on an earlier release (2017?) of wonambi: https://pypi.org/project/sleepytimes/

@gpiantoni
Copy link
Member

Sorry for not getting back to you. Could you share a small example of the dataset?

@matt-sf
Copy link
Author

matt-sf commented Mar 15, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants