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

MAINT: fix the function interpretation for scalar_image_function_inspector.py #894

Merged
merged 4 commits into from
May 16, 2023

Conversation

homosapien-lcy
Copy link
Contributor

@homosapien-lcy homosapien-lcy commented May 8, 2023

After the update of python version, the how "exec" works seem have changed in certain versions and caused exec("import *") to fail. This has caused issue in issue #890 . To address this issue, I changed the import to include specific name of the modules (cos, tanh, jn) in use. Closes issue #890

Copy link
Contributor

@corranwebster corranwebster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, the difference is that last year scipy.__init__ has added an __all__ to the module, which restricts what is imported by from scipy import * so that it no longer includes the basic functions like tanh.

Given that the formula is meant to be edited by humans and to allow them to enter any reasonable scientific function, we want to keep the "*" imports, but we should probably get basic functions from NumPy and special functions from SciPy.

@corranwebster corranwebster merged commit cccedf6 into main May 16, 2023
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.

2 participants