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

Numpy 1.9 issues. #3186

Closed
charris opened this issue Jul 4, 2014 · 3 comments · Fixed by #3188
Closed

Numpy 1.9 issues. #3186

charris opened this issue Jul 4, 2014 · 3 comments · Fixed by #3188
Milestone

Comments

@charris
Copy link

charris commented Jul 4, 2014


======================================================================
ERROR: test suite for <class 'matplotlib.tests.test_triangulation.test_tri_smooth_contouring'>
----------------------------------------------------------------------
Traceback (most recent call last):
  File "X:\Python27-x64\lib\site-packages\nose\suite.py", line 208, in run
    self.setUp()
  File "X:\Python27-x64\lib\site-packages\nose\suite.py", line 291, in setUp
    self.setupContext(ancestor)
  File "X:\Python27-x64\lib\site-packages\nose\suite.py", line 314, in setupContext
    try_run(context, names)
  File "X:\Python27-x64\lib\site-packages\nose\util.py", line 470, in try_run
    return func()
  File "X:\Python27-x64\lib\site-packages\matplotlib\testing\decorators.py", line 102, in setup_class
    cls._func()
  File "X:\Python27-x64\lib\site-packages\matplotlib\tests\test_triangulation.py", line 715, in test_tri_smooth_contouring
    tri_refi, z_test_refi = refiner.refine_field(z0, subdiv=4)
  File "X:\Python27-x64\lib\site-packages\matplotlib\tri\trirefine.py", line 179, in refine_field
    subdiv=subdiv, return_tri_index=True)
  File "X:\Python27-x64\lib\site-packages\matplotlib\tri\trirefine.py", line 125, in refine_triangulation
    ] = np.repeat(ancestors[ancestor_mask], 3)
ValueError: shape mismatch: value array of shape (13824,) could not be broadcast to indexing result of shape (4608,3)



======================================================================
ERROR: test suite for <class 'matplotlib.tests.test_triangulation.test_tri_smooth_gradient'>
----------------------------------------------------------------------
Traceback (most recent call last):
  File "X:\Python27-x64\lib\site-packages\nose\suite.py", line 208, in run
    self.setUp()
  File "X:\Python27-x64\lib\site-packages\nose\suite.py", line 291, in setUp
    self.setupContext(ancestor)
  File "X:\Python27-x64\lib\site-packages\nose\suite.py", line 314, in setupContext
    try_run(context, names)
  File "X:\Python27-x64\lib\site-packages\nose\util.py", line 470, in try_run
    return func()
  File "X:\Python27-x64\lib\site-packages\matplotlib\testing\decorators.py", line 102, in setup_class
    cls._func()
  File "X:\Python27-x64\lib\site-packages\matplotlib\tests\test_triangulation.py", line 752, in test_tri_smooth_gradient
    tri_refi, z_test_refi = refiner.refine_field(V, subdiv=3)
  File "X:\Python27-x64\lib\site-packages\matplotlib\tri\trirefine.py", line 179, in refine_field
    subdiv=subdiv, return_tri_index=True)
  File "X:\Python27-x64\lib\site-packages\matplotlib\tri\trirefine.py", line 125, in refine_triangulation
    ] = np.repeat(ancestors[ancestor_mask], 3)
ValueError: shape mismatch: value array of shape (5376,) could not be broadcast to indexing result of shape (1792,3)

======================================================================
ERROR: matplotlib.tests.test_triangulation.test_triinterp
----------------------------------------------------------------------
Traceback (most recent call last):
  File "X:\Python27-x64\lib\site-packages\nose\case.py", line 197, in runTest
    self.test(*self.arg)
  File "X:\Python27-x64\lib\site-packages\matplotlib\tests\test_triangulation.py", line 306, in test_triinterp
    (interp_dzsdx, interp_dzsdy) = cubic_user.gradient(x, y)
  File "X:\Python27-x64\lib\site-packages\matplotlib\tri\triinterpolate.py", line 435, in gradient
    return_keys=('dzdx', 'dzdy'))
  File "X:\Python27-x64\lib\site-packages\matplotlib\tri\triinterpolate.py", line 208, in _interpolate_multikeys
    return_key, valid_tri_index, valid_x, valid_y) * scale
TypeError: NumPy boolean array indexing assignment requires a 0 or 1-dimensional input, input has 2 dimensions

======================================================================
ERROR: matplotlib.tests.test_triangulation.test_triinterpcubic_C1_continuity
----------------------------------------------------------------------
Traceback (most recent call last):
  File "X:\Python27-x64\lib\site-packages\nose\case.py", line 197, in runTest
    self.test(*self.arg)
  File "X:\Python27-x64\lib\site-packages\matplotlib\tests\test_triangulation.py", line 405, in test_triinterpcubic_C1_continuity
    check_continuity(interp, (ax, ay), values[:, 0])
  File "X:\Python27-x64\lib\site-packages\matplotlib\tests\test_triangulation.py", line 366, in check_continuity
    (dzx, dzy) = interpolator.gradient([loc_x], [loc_y])
  File "X:\Python27-x64\lib\site-packages\matplotlib\tri\triinterpolate.py", line 435, in gradient
    return_keys=('dzdx', 'dzdy'))
  File "X:\Python27-x64\lib\site-packages\matplotlib\tri\triinterpolate.py", line 208, in _interpolate_multikeys
    return_key, valid_tri_index, valid_x, valid_y) * scale
TypeError: NumPy boolean array indexing assignment requires a 0 or 1-dimensional input, input has 2 dimensions

======================================================================
ERROR: matplotlib.tests.test_triangulation.test_trirefine
----------------------------------------------------------------------
Traceback (most recent call last):
  File "X:\Python27-x64\lib\site-packages\nose\case.py", line 197, in runTest
    self.test(*self.arg)
  File "X:\Python27-x64\lib\site-packages\matplotlib\tests\test_triangulation.py", line 880, in test_trirefine
    refined_triang, refined_z = refiner.refine_field(z, subdiv=1)
  File "X:\Python27-x64\lib\site-packages\matplotlib\tri\trirefine.py", line 179, in refine_field
    subdiv=subdiv, return_tri_index=True)
  File "X:\Python27-x64\lib\site-packages\matplotlib\tri\trirefine.py", line 116, in refine_triangulation
    found_index[refi_triangles] = np.repeat(ancestors, 3)
ValueError: shape mismatch: value array of shape (24,) could not be broadcast to indexing result of shape (8,3)

Issues of the sort

ValueError: shape mismatch: value array of shape (5376,) could not be broadcast to indexing result of shape (1792,3)

have been fixed to raise a FutureWarning instead, but this is a heads up.

@efiring
Copy link
Member

efiring commented Jul 4, 2014

@ianthomas23, I think this can be fixed very easily, and it makes sense to do it before 1.4.0 if possible. Will you be able to take a look?

@efiring efiring added this to the v1.4.0 milestone Jul 4, 2014
@tacaswell
Copy link
Member

I get these on master on linux.

tacaswell added a commit to tacaswell/matplotlib that referenced this issue Jul 5, 2014
 fixes some of the issues raised in matplotlib#3186
tacaswell added a commit to tacaswell/matplotlib that referenced this issue Jul 5, 2014
@tacaswell
Copy link
Member

numpy/numpy#4804 (github-foo linking)

jenshnielsen pushed a commit to jenshnielsen/matplotlib that referenced this issue Jul 12, 2014
jenshnielsen pushed a commit to jenshnielsen/matplotlib that referenced this issue Jul 12, 2014
joferkington pushed a commit to joferkington/matplotlib that referenced this issue Jul 23, 2014
joferkington pushed a commit to joferkington/matplotlib that referenced this issue Jul 23, 2014
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

Successfully merging a pull request may close this issue.

3 participants