This repository has been archived by the owner on Jul 23, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Replacement manager #11
Open
cjayross
wants to merge
20
commits into
einsteinpy:master
Choose a base branch
from
cjayross:replacement_manager
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
Hello @cjayross! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2019-07-09 05:24:41 UTC |
Squash the commits please! |
@@ -1,5 +1,4 @@ | |||
""" | |||
======= |
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.
No need to remove this!
Rebase this! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Addresses #8
Please merge. Spare me of the shame that was
ReplacementManager
.ReplacementManager
was a global data structure that managed a dictionary between tensors that are represented symbolically and the arrays that represent the data they contain. It was a terrible idea to have this be defined globally as this causes lots of issues when using the same symbol for different tensors.Now I simply have each tensor carry with it it's own dictionary entry to be used in the
expand_tensor
function. The function walks through an expression tree of tensor objects and adds these entries to a dictionary local to the function. This local dictionary is used instead ofReplacementManager
.