Matplotlib 2.0.0 crashes on plotting contour of array with two dimensions of size 1 in Python 3.4 #8197

Closed
jeroenmuller opened this Issue Mar 5, 2017 · 1 comment

Comments

Projects
None yet
3 participants

jeroenmuller commented Mar 5, 2017 • edited

Bug report

Bug summary

Python crashes on plotting contour of array with two dimensions of size 1.

Code for reproduction

import numpy as np
import matplotlib.pyplot as plt

im = np.array([[0]])
plt.contour(im)

Actual outcome

Python interpreter craches, with this message:
Floating point exception (core dumped) 

Expected outcome
This is the output I get on Python 2.6.6:
ValueError: zero-size array to reduction operation minimum which has no identity

Matplotlib version
Fedora 23, with Matplotlib 2.0.0 and numpy 1.12.0 installed using pip.

ianthomas23 was assigned by efiring Mar 6, 2017

@NelleV NelleV added a commit that referenced this issue Mar 11, 2017

@NelleV NelleV Merge pull request #8227 from ianthomas23/8197_contour_1x1_array
Contouring 1x1 array (issue #8197)
b07a09d
Member

ianthomas23 commented Mar 15, 2017

Fixed by PR #8227. Thanks for the bug report @jeroenmuller.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment