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

Curves: add missing parametric constructors, remove _assure_has_components #267

Merged
merged 2 commits into from
Feb 9, 2021

Conversation

fingolfin
Copy link
Member

For parametric types, one should provide parametric constructors (and then perhaps, as in this case, non-parametric ones for convenience).

This allows us to avoid some code duplication.

Also, try hard to not access C.components directly, instead use curve_components(C) -- this allows us to get rid of _assure_has_components

For parametric types, one should provide parametric constructors
(and then perhaps, as in this case, non-parametric ones for convenience).

This allows us to merge some duplicate code.
Instead, just never access C.components directly, instead
use curve_components(C)
@delphinepol
Copy link
Contributor

I didn't know about the parametric constructors, and that it was the thing to make the unified code working, thank you ! I didn't know neither that it was better to avoid commands like C.components...

@delphinepol
Copy link
Contributor

I had a look at the tests, some are failing but it doesn't seem to be because of your changes on the curves, it seems to be somewhere else.

@fingolfin fingolfin merged commit cd3c936 into oscar-system:master Feb 9, 2021
@fingolfin fingolfin deleted the mh/curves-uniform branch February 9, 2021 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants