What steps will reproduce the problem?
What is the expected output? What do you see instead?
Please provide any additional information below
File "/home/mybutt/miniconda2/lib/python2.7/site-packages/spyder/widgets/variableexplorer/collectionseditor.py", line 449, in createEditor
if not editor.setup_and_check(value, title=key, readonly=readonly):
File "/home/mybutt/miniconda2/lib/python2.7/site-packages/spyder/widgets/variableexplorer/arrayeditor.py", line 715, in setup_and_check
self.current_dim_changed(self.last_dim)
File "/home/mybutt/miniconda2/lib/python2.7/site-packages/spyder/widgets/variableexplorer/arrayeditor.py", line 784, in current_dim_changed
self.change_active_widget(0)
File "/home/mybutt/miniconda2/lib/python2.7/site-packages/spyder/widgets/variableexplorer/arrayeditor.py", line 764, in change_active_widget
self.data[slice_index]))
IndexError: index 0 is out of bounds for axis 0 with size 0
pyflakes >=0.5.0 : 1.6.0 (OK)
pycodestyle >=2.3 : 2.3.1 (OK)
pygments >=2.0 : 2.2.0 (OK)
pandas >=0.13.1 : 0.20.3 (OK)
numpy >=1.7 : 1.13.3 (OK)
sphinx >=0.6.6 : 1.6.3 (OK)
rope >=0.9.4 : 0.10.5 (OK)
jedi >=0.9.0 : 0.10.2 (OK)
psutil >=0.3 : 5.4.0 (OK)
nbconvert >=4.0 : 5.3.1 (OK)
sympy >=0.7.3 : None (NOK)
cython >=0.21 : None (NOK)
qtconsole >=4.2.0 : 4.3.1 (OK)
IPython >=4.0;<6.0: 5.4.1 (OK)
pylint >=0.25 : 1.7.4 (OK)
Thank you @Giangblackk. The variable x
you created could not be visualized as it is empty. Its first dimension is 0, it has no element. With x =np.zeros((1, 10, 20))
it works fine.
@ccordoba12 should we add a check to not support the empty arrays?
@Prikers, we do support empty arrays, so we should catch this error and show an empty array editor instance.
Most helpful comment
@Prikers, we do support empty arrays, so we should catch this error and show an empty array editor instance.