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

Poly Object should have __eq__ property #9

Open
b-butler opened this issue Sep 6, 2019 · 3 comments
Open

Poly Object should have __eq__ property #9

b-butler opened this issue Sep 6, 2019 · 3 comments
Labels
enhancement New feature or request

Comments

@b-butler
Copy link
Member

b-butler commented Sep 6, 2019

Equality checks based on points would be useful for tests and general comparisons.

@b-butler
Copy link
Member Author

Description

Shapes can be equivalent and we should be able to check that. If #11 is fixed using a simple check on vertices should be enough. We may want to consider vertices which are within a certain dx ~ 1e-6 from each other as equal.

Tasks

  • Implement __eq__ methods for Poly classes
  • Document functionality
  • Add unit test for functionality

@b-butler b-butler added good first issue Good for newcomers enhancement New feature or request labels Nov 14, 2019
@vyasr
Copy link
Contributor

vyasr commented Jan 28, 2021

I would like to add equality checks, but I'm not comfortable with any tolerance-based checks. I think only exact equality should match, just like with numpy arrays or similar. We could add a separate method to check approximate equality.

@b-butler
Copy link
Member Author

Hmm in that case we should probably just follow NumPy with an isclose method.

@janbridley janbridley removed the good first issue Good for newcomers label Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants