Closed JeffreyWardman closed 2 months ago
The primary update focuses on refining the precision of the contains
method in the vedo
library by introducing an additional atol
parameter in the isclose
function call. This adjustment enhances the method's accuracy in determining point containment within shapes by providing a more customizable tolerance setting, thereby improving its utility across various computational scenarios.
File | Summary of Changes |
---|---|
vedo/shapes.py |
Adjusted tolerance parameter in contains method with the addition of atol in isclose function call. |
vedo/shapes.py (24)
3939-3939: Multiple statements on one line (colon) --- 3940-3940: Multiple statements on one line (colon) --- 3941-3941: Multiple statements on one line (colon) --- 3942-3942: Multiple statements on one line (colon) --- 3943-3943: Multiple statements on one line (colon) --- 3962-3962: Do not use bare `except` --- 3986-3986: Do not use bare `except` --- 3994-3994: Do not use bare `except` --- 4322-4322: Multiple statements on one line (colon) --- 4323-4323: Multiple statements on one line (colon) --- 4324-4324: Multiple statements on one line (colon) --- 4325-4325: Multiple statements on one line (colon) --- 4464-4464: Multiple statements on one line (colon) --- 4465-4465: Multiple statements on one line (colon) --- 4466-4466: Multiple statements on one line (colon) --- 4726-4726: Multiple statements on one line (colon) --- 4727-4727: Multiple statements on one line (colon) --- 4728-4728: Multiple statements on one line (colon) --- 4730-4730: Multiple statements on one line (colon) --- 4731-4731: Multiple statements on one line (colon) --- 4732-4732: Multiple statements on one line (colon) --- 4734-4734: Multiple statements on one line (colon) --- 4735-4735: Multiple statements on one line (colon) --- 4736-4736: Multiple statements on one line (colon)
As per https://numpy.org/doc/stable/reference/generated/numpy.isclose.html,
numpy.isclose(a, b, rtol=1e-05, atol=1e-08, equal_nan=False)
Currently, b is set to tol, which defaults to 0. It should always be 0 and the tol should either be relative or absolute (rtol/atol). Therefore the setting of input variables is incorrect at the moment.
Summary by CodeRabbit
contains
method.