Skip to content

Fixing Issue #21879: Changed int to round to help with floating point issue #27473

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

iimimii
Copy link

@iimimii iimimii commented Dec 8, 2023

PR summary

For this issue: #21879

However, I reached an issue with purging the development environment. The development environment folder no longer showed up on my local computer, but was still showing in the GitHub repo in the pull request. When I continued to try and remove the environment I was not able to make any more commits. So I decided to reclone the repo and fix the code without setting up a development environment.

The original issue was a valueError that was caused by incorrect rounding of array values. In order to fix the rounding bug, we changed the int casting into round instead. This should solve the rounding bug and improve functionality of matplotlib.

Update

Received a comment about generating the same output images. I attempted casting the rounded values back into the int type to hopefully prevent images from generating differently. I also removed np.ciel from line 102 of the code.

PR checklist

@tacaswell
Copy link
Member

As with #8265 I expect this to change out put images.

@dstansby dstansby changed the title Fixing Issue #21879: Changed int to round to help with floating point issue (purged development environment) Fixing Issue #21879: Changed int to round to help with floating point issue Jan 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Needs review
Development

Successfully merging this pull request may close these issues.

2 participants