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

Rounding issue in sector.py #67

Closed
robby-wang opened this issue May 8, 2024 · 1 comment
Closed

Rounding issue in sector.py #67

robby-wang opened this issue May 8, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@robby-wang
Copy link

There's rounding issue in sector.py, around line 210.
When there's only one item in the sector, it might have a rounding error.

When I added this code in the if statement:
print(self.start, self.end, x)
I got:
0 0.23938634812405565 0.23938634812405568

I was able to quickly fix it by changing it to:
if not self.start <= x <= (self.end+0.000000000001) and not ignore_range_error:

But I'd imagine there's better fix than this.

Thanks for creating and maintaining pyCirclize, it's a very useful tool!

@moshi4
Copy link
Owner

moshi4 commented May 11, 2024

Hi @robby-wang,

Thank you for reporting this bug. I will try to fix it in the next release. Similar issue #27.

@moshi4 moshi4 added the bug Something isn't working label May 11, 2024
@moshi4 moshi4 mentioned this issue May 18, 2024
@moshi4 moshi4 closed this as completed May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants