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

Divide by zero error in matplotlib.tests.test_colors.test_light_source_shading_color_range #3248

Closed
jenshnielsen opened this issue Jul 13, 2014 · 1 comment
Milestone

Comments

@jenshnielsen
Copy link
Member

This is mainly to remind my self to fix this later. Not release critical

A bunch of Numpy runtime warnings are thrown in this test because it is shading
a flat surface which gives an uniform intensity which results in a divide by zero when normalising the intensity.

This should be fixed IMHO by:

  • Add a test with a more interesting surface.
  • Change share_rgb to avoid dividing by (intensity.max()-intensity.min()) when these are identical. This will change the result of the current test.
  • Alternatively one could fix this adding an assertion and refuse to shade flat surfaces.
@tacaswell tacaswell modified the milestones: v1.5.x, v1.4.x Jul 13, 2014
@jenshnielsen
Copy link
Member Author

This has been fixed on the master branch by the merge of #3291

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

2 participants