Thanks to visit codestin.com
Credit goes to github.com

Skip to content

BUG: AxesImage.set_data([[]]) causes FloatingPointException #7964

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

Closed
astrofrog opened this issue Jan 27, 2017 · 1 comment
Closed

BUG: AxesImage.set_data([[]]) causes FloatingPointException #7964

astrofrog opened this issue Jan 27, 2017 · 1 comment

Comments

@astrofrog
Copy link
Contributor

The following code leads to a fatal Floating Point Exception 8 error with Matplotlib 2.0:

In [1]:  import numpy as np

In [2]: im = plt.imshow(np.random.random((128,128)))

In [3]: im.set_data([[]])

In [4]: /Users/tom/miniconda3/envs/dev/lib/python3.6/site-packages/matplotlib/image.py:327: RuntimeWarning: divide by zero encountered in double_scalars
  in_bbox.width / A.shape[1],
Floating point exception: 8

which then causes the Python session to end. This is a regression in 2.0, as it worked in 1.5.

@QuLogic
Copy link
Member

QuLogic commented Jan 27, 2017

I think this is a dupe of #7886.

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

No branches or pull requests

2 participants