You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TriAnalyzer.scale_factors() has mismatched boolean indexes #4999
Testing matplotlib master with numpy 1.10rc1 revealed some possible bugs in matplotlib through deprecation warnings. One set of warnings comes from the triangulation library:
/nas/home/broot/centos6/lib/python2.7/site-packages/matplotlib-1.5.dev1-py2.7-linux-x86_64.egg/matplotlib/tri/tritools.py:52: VisibleDeprecationWarning: boolean index did not match indexed array along dimension 0; dimension is 5 but corresponding boolean dimension is 4
x = self._triangulation.x[node_used]
/nas/home/broot/centos6/lib/python2.7/site-packages/matplotlib-1.5.dev1-py2.7-linux-x86_64.egg/matplotlib/tri/tritools.py:53: VisibleDeprecationWarning: boolean index did not match indexed array along dimension 0; dimension is 5 but corresponding boolean dimension is 4
y = self._triangulation.y[node_used]
Indeed, adding a check in scale_factors() and running the triangulation test suite reveals:
======================================================================
ERROR: __main__.test_tritools
----------------------------------------------------------------------
Traceback (most recent call last):
File "/nas/home/broot/centos6/lib/python2.7/site-packages/nose-1.1.2-py2.7.egg/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "lib/matplotlib/tests/test_triangulation.py", line 834, in test_tritools
assert_array_almost_equal(analyser.scale_factors,
File "/nas/home/broot/centos6/lib/python2.7/site-packages/matplotlib-1.5.dev1-py2.7-linux-x86_64.egg/matplotlib/tri/tritools.py", line 55, in scale_factors
len(node_used)))
ValueError: len of nodes does not match node_used. 5 vs. 4
Should be, now that the two PRs are in. If there are other sources of this bug in the tri module, I wouldn't know and the tests aren't picking up on it using numpy 1.10.
Activity
WeatherGod commentedon Aug 27, 2015
attn: @GBillotey
ianthomas23 commentedon Sep 14, 2015
@WeatherGod: Thanks for reporting this. Bug confirmed using numpy 1.10.0b1; trivial fix on its way.
jenshnielsen commentedon Sep 15, 2015
@ianthomas23 @WeatherGod Is this fully fixed?
WeatherGod commentedon Sep 15, 2015
Should be, now that the two PRs are in. If there are other sources of this bug in the tri module, I wouldn't know and the tests aren't picking up on it using numpy 1.10.