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
Getting Error: "IndexError: index 0 is out of bounds for axis 0 with size 0" #8085
Comments
I can't replicate on Linux, it's possible that this is a windows issue. Before I boot a VM to look into it, when you hit the error can you try:
and let us know the output? It can help with debugging |
Thanks for the response @larsoner . Im using PyCharm and I am not familiar with |
Can you run Python from a standard terminal instead? Copy-pasting your code (with an
and you should end up dropped to a prompt where you can It's also likely that pycharm has some built-in debugging capability where you can have it drop to a prompt if it hits an error. |
Thanks for the clear instruction @larsoner . Surprisingly, the plot was rendered without any hiccup when executing the commands using "interactive mode". However, there is a catch whereby the figure was plotted properly only during the first execution (i.e., execute only the Also, the blank figure outputted is accessible via the link: https://imgur.com/gallery/7F44vsE For some reason, PyCharm does not show any prompt to input the |
Hopefully this was fixed by #8103, let's reopen if not |
I still have the same problem with todays 0.22dev version, also on windows 10. If I run it through debugger it works. Somtimes it works one time and not the second If I run your post-mortem debugging thingy I get this:
(note that I changed the np.abs(m) to np.abs(M) hope that was intended) |
@behinger do you have NumPy 1.19.4? I wonder if it's this Windows bug: https://developercommunity2.visualstudio.com/t/fmod-after-an-update-to-windows-2004-is-causing-a/1207405 For now the workaround is to install NumPy 1.19.3 on Windows. |
edit:Oh no. It didnt resolve it after all, for some reason it worked for the first component, but not a seocnd one - also not if I rerun the same cell nice! yes indeed I had Numpy 1.19.2 installed. With 1.19.3 it works now. Thanks alot! it might also explain random SVD errors I got :) |
Is there a specific Scipy library we should maybe be using too? I've got a similar error when trying to open multiple figures from my epochs object and have tried installing my Numpy to version 1.19.3 and have MNE 0.21.2 installed. I'm using a Windows machine too. My initial epochs['Visual/easy'].plot_psd() works but the second creates the error seen in the prompt output. Python code:
Prompt:
|
Describe the bug
While executing
ica.plot_properties(raw, picks=ecg_indices)
, the compiler return an errorIndexError: index 0 is out of bounds for axis 0 with size 0
The full error trail:
Steps to reproduce
Additional information
System:
Windows 10
anaconda3
mne-0.21.dev0
Python 3.7
Link to download S17_3.mff
The text was updated successfully, but these errors were encountered: