-
Notifications
You must be signed in to change notification settings - Fork 65
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
Fix init_printing #371
Fix init_printing #371
Conversation
symengine/__init__.py
Outdated
@@ -60,7 +60,6 @@ def lambdify(args, exprs, **kwargs): | |||
|
|||
|
|||
# To not expose internals | |||
del lib.symengine_wrapper |
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.
Is this needed?
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.
On my system it is needed, since lib.symengine_wrapper
is not imported anywhere. I can replace it with
try:
del lib.symengine_wrapper
except NameError:
pass
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.
With the latest change, can you try removing this?
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.
@isuruf Back to the old behaviour. Works locally, CI fails but it seems unrelated to this PR.
I understand the desire to hide the internals of symengine in the python interface, but removing the lib.xxx
is a bit drastic I think. A better way might be to rename to something that makes it clear it is internal, e.g. internal_lib.xxxx
and let the responsibility to use it or not be with the user.
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 user can still do import symengine.lib.symengine_wrapper
. They have to explicitly do that instead of having access to it when they do import symengine
.
Co-authored-by: Isuru Fernando <isuruf@gmail.com>
Thanks |
The execution if
init_printing
failed because in thesymengine
initialization thesymengine.lib
import was deleted.