CARVIEW |
Navigation Menu
-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Added support for naming of Indexed types and avoid passing unnecessary kw_args #15004
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
Conversation
âś… Hi, I am the SymPy bot (v124). I'm here to make sure this pull request has a release notes entry. Please read the guide on how to write release notes. Click here to see the pull request description that was parsed.
Your release notes are in good order. Here is what the release notes will look like:
This will be added to https://github.com/sympy/sympy/wiki/Release-Notes-for-1.2.1. Note: This comment will be updated with the latest check if you edit the pull request. You need to reload the page to see it. Update The release notes on the wiki have been updated. |
Let us see what @akash9712 has to say. |
Yes. |
Sorry for the delay. This seems to work fine with the expression. Should a test be added in for |
sympy/tensor/indexed.py
Outdated
for index in self.args[1:-1]: | ||
indices_str += str(index) + "," | ||
indices_str += str(self.args[-1]) + "]" | ||
return self.base.name + indices_str |
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.
Would it suffice to return str(self)
?
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.
Yes, it does. Missed that earlier. Updated now.
sympy/tensor/indexed.py
Outdated
@@ -403,8 +407,13 @@ def __new__(cls, label, shape=None, **kw_args): | |||
obj._shape = shape | |||
obj._offset = offset | |||
obj._strides = strides | |||
obj.__name__ = str(label) |
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.
This should be _name
. Double underscore prefixes should never be used, except for the ones that mean something in the language.
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.
Changed.
There is another issue that could be fixed in this PR.
Those |
@jksuom Okay, done. |
Thanks, this looks good to me. |
Added support for naming of Indexed types and avoid passing unnecessary kw_args
References to other Issues or PRs
Fixes #14960
Brief description of what is fixed or changed
Release Notes