Skip to content

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

Open
iimimii wants to merge 6 commits into
matplotlib:mainfrom
oliviavanzandt:v2mimi
Open

Fixing Issue #21879: Changed int to round to help with floating point issue#27473
iimimii wants to merge 6 commits into
matplotlib:mainfrom
oliviavanzandt:v2mimi

Conversation

@iimimii

@iimimii iimimii commented Dec 8, 2023

Copy link
Copy Markdown

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
Copy Markdown
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
@ayshih

ayshih commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Per my thoughts in #8265 (comment), I suggest closing this PR

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

Projects

Status: Needs review

Development

Successfully merging this pull request may close these issues.

4 participants