pyCirclize icon indicating copy to clipboard operation
pyCirclize copied to clipboard

Rounding issue in sector.py

Open robby-wang opened this issue 1 year ago • 1 comments

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!

robby-wang avatar May 08 '24 00:05 robby-wang

Hi @robby-wang,

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

moshi4 avatar May 11 '24 10:05 moshi4