Skip to content

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

Merged
corranwebster merged 4 commits into
mainfrom
fix_funcgion_interpretation
May 16, 2023
Merged

MAINT: fix the function interpretation for scalar_image_function_inspector.py#894
corranwebster merged 4 commits into
mainfrom
fix_funcgion_interpretation

Conversation

@homosapien-lcy
Copy link
Copy Markdown
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

Comment thread chaco/examples/demo/advanced/scalar_image_function_inspector.py Outdated
Comment thread chaco/examples/demo/advanced/scalar_image_function_inspector.py Outdated
Copy link
Copy Markdown
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