-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not access '_name' attribute of object with no name (#328)
When collecting a common subexpression from a long expression in the AST, a temporary variable is created whose name is obtained from the `_name` attribute of the first SymPy object in a list. In certain unfortunate cases such an object does not have the `_name` attribute and an `AttributeError` is raised. The problem is solved by cycling through each element in the aforementioned list, and extracting `_name` from the first object with such an attribute. This is done via the new `get_name` function. Fixes #327.
- Loading branch information
Showing
3 changed files
with
55 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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