MAINT: fix the function interpretation for scalar_image_function_inspector.py#894
Merged
Conversation
corranwebster
suggested changes
May 10, 2023
Contributor
corranwebster
left a comment
There was a problem hiding this comment.
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
approved these changes
May 15, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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