You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Estimating Ellipse Sometimes fails due to np.linalg.eig Casting to complex #7013
It seems like in the EllipseModel.fit function np.linalg.eig is called which returns either a complex matrix or casts to a real matrix if the matrix has no complex component. See here
We have been running into a problem where occasionally the np.linalg.eig() function will return a very small complex component some times. Most likely this is a result of some very small floating point error, maybe from the casting to 32 bit floats?
The code fails when it tries to find the remainder of a complex and float dtype:
@stefanv I don't exactly know about a reproducible test case. I've played around with it and most of the failing cases require floats with lots of precision. It might be hardware/operating system dependent as well but I'm not sure.
I can make a PR with the fix and maybe we can think about how to best test this.
Hello scikit-image core devs! There hasn't been any activity on this issue for more than 180 days. I have marked it as "dormant" to make it easy to find.
To our contributors, thank you for your contribution and apologies if this issue fell through the cracks! Hopefully this ping will help bring some fresh attention to the issue. If you need help, you can always reach out on our forum
If you think that this issue is no longer relevant, you may close it, or we may do it at some point (either way, it will be done manually).
Activity
stefanv commentedon Jun 8, 2023
Thanks @CSSFrancis! Are you able to come up with a reproducible test case, and add the fix along with a test as a PR?
CSSFrancis commentedon Jun 8, 2023
@stefanv I don't exactly know about a reproducible test case. I've played around with it and most of the failing cases require floats with lots of precision. It might be hardware/operating system dependent as well but I'm not sure.
I can make a PR with the fix and maybe we can think about how to best test this.
stefanv commentedon Jun 8, 2023
Thanks @CSSFrancis, that works.
github-actions commentedon Mar 17, 2024
Hello scikit-image core devs! There hasn't been any activity on this issue for more than 180 days. I have marked it as "dormant" to make it easy to find.
To our contributors, thank you for your contribution and apologies if this issue fell through the cracks! Hopefully this ping will help bring some fresh attention to the issue. If you need help, you can always reach out on our forum
If you think that this issue is no longer relevant, you may close it, or we may do it at some point (either way, it will be done manually).
MAINT: make ellipse fitting forward compatible (#8054)