Repository navigation
Closed
Description
I am getting test errors with current matplotlib trunk and numpy 1.5.1. An example is here:
======================================================================
ERROR: test suite for <class 'matplotlib.tests.test_axes.test_hist_stacked_bar'>
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/nose/plugins/multiprocess.py", line 788, in run
self.setUp()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/nose/suite.py", line 291, in setUp
self.setupContext(ancestor)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/nose/plugins/multiprocess.py", line 770, in setupContext
super(NoSharedFixtureContextSuite, self).setupContext(context)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/nose/suite.py", line 314, in setupContext
try_run(context, names)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/nose/util.py", line 470, in try_run
return func()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 139, in setup_class
cls._func()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/tests/test_axes.py", line 1988, in test_hist_stacked_bar
ax.hist(d, bins=10, histtype='barstacked', align='mid', color=colors, label=labels)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/axes/_axes.py", line 5479, in hist
flat = np.ravel(x)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/fromnumeric.py", line 1097, in ravel
return asarray(a).ravel(order)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/numeric.py", line 284, in asarray
return array(a, dtype, copy=False, order=order)
ValueError: setting an array element with a sequence.
This boils down to the following code:
In [5]: x = [[], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]]
In [6]: np.array(x)
This raises an error (setting an array element with a sequence) for numpy 1.5.1 but passes for numpy 1.6.0. Should I try and work round this, or should matplotlib update compatibility to numpy 1.6.0 ?
Metadata
Metadata
Assignees
Labels
No labels
Activity
tacaswell commentedon Jul 6, 2014
My inclination would be to bump our minimum version up to 1.6
efiring commentedon Jul 6, 2014
Moving to 1.6 (or higher? at least one of the 1.6 bugfix releases?) makes sense to me.