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

Shading tests failing on master #3639

Closed
tacaswell opened this issue Oct 11, 2014 · 6 comments
Closed

Shading tests failing on master #3639

tacaswell opened this issue Oct 11, 2014 · 6 comments
Milestone

Comments

@tacaswell
Copy link
Member


======================================================================
FAIL: Array comparison test for the default "hsv" blend mode. Ensure the
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/virtualenv/python2.6.9/lib/python2.6/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/travis/virtualenv/python2.6.9/lib/python2.6/site-packages/matplotlib-1.5.x-py2.6-linux-x86_64.egg/matplotlib/tests/test_colors.py", line 304, in test_light_source_shading_default
    assert_array_almost_equal(rgb, expect, decimal=2)
  File "/home/travis/virtualenv/python2.6.9/lib/python2.6/site-packages/numpy/testing/utils.py", line 842, in assert_array_almost_equal
    precision=decimal)
  File "/home/travis/virtualenv/python2.6.9/lib/python2.6/site-packages/numpy/testing/utils.py", line 665, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not almost equal to 2 decimals

(mismatch 16.40625%)
 x: array([[[  8.72e-01,   8.72e-01,   8.72e-01,   1.00e+00],
        [  8.31e-01,   7.63e-01,   7.20e-01,   1.00e+00],
        [  8.75e-01,   7.90e-01,   7.38e-01,   1.00e+00],...
 y: array([[[ 0.87,  0.87,  0.87,  1.  ],
        [ 0.85,  0.79,  0.75,  1.  ],
        [ 0.9 ,  0.83,  0.78,  1.  ],...

======================================================================
FAIL: Array comparison test for a surface with a masked portion. Ensures that
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/virtualenv/python2.6.9/lib/python2.6/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/travis/virtualenv/python2.6.9/lib/python2.6/site-packages/matplotlib-1.5.x-py2.6-linux-x86_64.egg/matplotlib/tests/test_colors.py", line 355, in test_light_source_masked_shading
    assert_array_almost_equal(rgb, expect, decimal=2)
  File "/home/travis/virtualenv/python2.6.9/lib/python2.6/site-packages/numpy/testing/utils.py", line 842, in assert_array_almost_equal
    precision=decimal)
  File "/home/travis/virtualenv/python2.6.9/lib/python2.6/site-packages/numpy/testing/utils.py", line 665, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not almost equal to 2 decimals

(mismatch 29.296875%)
 x: array([[[  0.00e+00,   0.00e+00,   0.00e+00,   1.00e+00],
        [  9.50e-01,   9.27e-01,   9.13e-01,   1.00e+00],
        [  5.33e-01,   3.37e-01,   2.15e-01,   1.00e+00],...
 y: array([[[ 1.  ,  1.  ,  1.  ,  1.  ],
        [ 0.95,  0.93,  0.91,  1.  ],
        [ 0.96,  0.93,  0.91,  1.  ],...

----------------------------------------------------------------------

I get the same failures locally.

cc @jenshnielsen @joferkington

@tacaswell tacaswell added this to the v1.5.x milestone Oct 11, 2014
@tacaswell
Copy link
Member Author

I think the failing tests were added in #3291

@tacaswell
Copy link
Member Author

This is related to numpy 1.8 v 1.9

(conda27)tcaswell@eowyn:matplotlib$ python tests.py matplotlib.tests.test_colors
................
----------------------------------------------------------------------
Ran 16 tests in 3.639s

OK
(conda27)tcaswell@eowyn:matplotlib$ conda upgrade numpy
Error: Could not locate 'conda-upgrade'

Did you mean one of these?
    update
(conda27)tcaswell@eowyn:matplotlib$ conda update numpy 
Fetching package metadata: ..
Solving package specifications: .
Package plan for installation in environment /home/tcaswell/.virtualenvs/conda27:

The following packages will be UPDATED:

    numpy: 1.8.2-py27_0 --> 1.9.0-py27_0

Proceed ([y]/n)? y

Unlinking packages ...
[      COMPLETE      ] |##########################################################################################################################| 100%
Linking packages ...
[      COMPLETE      ] |##########################################################################################################################| 100%
(conda27)tcaswell@eowyn:matplotlib$ python tests.py matplotlib.tests.test_colors
............FF..
======================================================================
FAIL: Array comparison test for the default "hsv" blend mode. Ensure the
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tcaswell/.virtualenvs/conda27/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/tcaswell/other_source/matplotlib/lib/matplotlib/tests/test_colors.py", line 304, in test_light_source_shading_default
    assert_array_almost_equal(rgb, expect, decimal=2)
  File "/home/tcaswell/.virtualenvs/conda27/lib/python2.7/site-packages/numpy/testing/utils.py", line 842, in assert_array_almost_equal
    precision=decimal)
  File "/home/tcaswell/.virtualenvs/conda27/lib/python2.7/site-packages/numpy/testing/utils.py", line 665, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not almost equal to 2 decimals

(mismatch 16.40625%)
 x: array([[[  8.72e-01,   8.72e-01,   8.72e-01,   1.00e+00],
        [  8.31e-01,   7.63e-01,   7.20e-01,   1.00e+00],
        [  8.75e-01,   7.90e-01,   7.38e-01,   1.00e+00],...
 y: array([[[ 0.87,  0.87,  0.87,  1.  ],
        [ 0.85,  0.79,  0.75,  1.  ],
        [ 0.9 ,  0.83,  0.78,  1.  ],...

======================================================================
FAIL: Array comparison test for a surface with a masked portion. Ensures that
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tcaswell/.virtualenvs/conda27/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/tcaswell/other_source/matplotlib/lib/matplotlib/tests/test_colors.py", line 355, in test_light_source_masked_shading
    assert_array_almost_equal(rgb, expect, decimal=2)
  File "/home/tcaswell/.virtualenvs/conda27/lib/python2.7/site-packages/numpy/testing/utils.py", line 842, in assert_array_almost_equal
    precision=decimal)
  File "/home/tcaswell/.virtualenvs/conda27/lib/python2.7/site-packages/numpy/testing/utils.py", line 665, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not almost equal to 2 decimals

(mismatch 29.296875%)
 x: array([[[  0.00e+00,   0.00e+00,   0.00e+00,   1.00e+00],
        [  9.50e-01,   9.27e-01,   9.13e-01,   1.00e+00],
        [  5.33e-01,   3.37e-01,   2.15e-01,   1.00e+00],...
 y: array([[[ 1.  ,  1.  ,  1.  ,  1.  ],
        [ 0.95,  0.93,  0.91,  1.  ],
        [ 0.96,  0.93,  0.91,  1.  ],...

----------------------------------------------------------------------
Ran 16 tests in 3.076s

FAILED (failures=2)

cc @mwiebe

@joferkington
Copy link
Contributor

I think there was a change to the default behavior to numpy.gradient in 1.9. I'm guessing, but these are probably related to that change.

@jenshnielsen
Copy link
Member

This is a duplicate of #3598 and yes I think this is due to the gradient change in numpy. I

@tacaswell
Copy link
Member Author

Sorry for the noise, despite commenting on that other issue I had no memory of it..

@jenshnielsen
Copy link
Member

No problem, I should have had a fix for that thing long ago, but have been to busy with other stuff and pushed this back since it is not relevant for the 1.4.1 release.

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

No branches or pull requests

3 participants