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

Add verify=True argument to Curve and Triangle/Surface constructors #158

Closed
2 tasks done
dhermes opened this issue Dec 25, 2019 · 0 comments · Fixed by #163
Closed
2 tasks done

Add verify=True argument to Curve and Triangle/Surface constructors #158

dhermes opened this issue Dec 25, 2019 · 0 comments · Fixed by #163

Comments

@dhermes
Copy link
Owner

dhermes commented Dec 25, 2019

In #156 I realized that it's possible to pass an invalid degree and things don't "break", though they should. Parts of this change:

  • verify=True should be opt-out the same way _copy=True
  • _copy=True should be promoted to public copy=True (_copy being "internal" is too confusing)

The reason __init__() doesn't do any computation on degree (i.e. the reason the from_nodes() helpers exist) is because computing degree from number of nodes may be expensive (for curves it's just num_nodes - 1 but for triangles / surfaces it requires solving a quadratic) whereas verifying will be less expensive. Also, by making verify a keyword argument, callers have the option to opt-out of the verification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant