Closed robby-wang closed 4 months ago
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.
sector.py
When I added this code in the if statement: print(self.start, self.end, x) I got: 0 0.23938634812405565 0.23938634812405568
print(self.start, self.end, x)
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:
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!
Hi @robby-wang,
Thank you for reporting this bug. I will try to fix it in the next release. Similar issue #27.
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!