-
Notifications
You must be signed in to change notification settings - Fork 27
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
Refactor functions into submodule #67
Refactor functions into submodule #67
Conversation
src/flint/types/acb.pyx
Outdated
@@ -351,7 +351,7 @@ cdef class acb(flint_scalar): | |||
Complex sign function defined as a piecewise extension of | |||
the real sign function. | |||
|
|||
>>> from flint import showgood | |||
>>> from flint.types.eval_helper import showgood |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docstring should show how users are expected to import something.
Does from flint import showgood
not work with these changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could import showgood as all the other types are so it's available from flint itself but I left it this way as my understanding it was more for debugging?
The change should be minor I hope, happy for you to make the call
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is shown widely in the docs so it should be treated as an end user function. Previously the docs always showed it as being imported from flint
so we should preserve that for now (and continue to show that in the docs).
I think that from flint import showgood
should continue to work and should be what is shown in the docstrings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I'm happy to make the changes to fix this (tomorrow, sleep now). Won't be more than a few extra lines of code :)
Considering
and then I make this available in
works as expected. |
This seems to duplicate the code from functions.pyx in two places. Also an empty .pdx file has been added (I don't know what a .pdx file is). |
@oscarbenjamin I did something stupid when cleaning up and deleted the wrong branch (trying to do too many things) So sorry for the mess up. |
This has a merge conflict now. |
Resolved, I can't keep up with all the versions! |
If this is adding a new package then it also needs to be add here: Lines 66 to 73 in 24267a5
|
Looks good. Thanks! |
This PR aims to finish the work on refactoring to remove all include, fixing issue #15.
The last file,
functions.pyx
has been renamed toeval_helper.pyx
and is used in doctests for various flint types.