-
Notifications
You must be signed in to change notification settings - Fork 156
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
Adding support for executing attribute/query calls without assigning to a prior variable #2337
Adding support for executing attribute/query calls without assigning to a prior variable #2337
Conversation
Converting to draft as few corner cases need to be checked and the |
The |
Thanks! I need to think about if this is the right way to fix it. It seems to be adding symbolics stuff into the frontend at places where maybe it shouldn't belong. I'll get back to you. |
Yeah I sometimes was suspecting if this is moving in the wrong place but then let's say we have
I think so we could stick to this but I am also not sure if we could do better ! |
@czgdp1807, @Thirumalai-Shaktivel, @Shaikh-Ubaid any ideas how to best support this? We want to support custom SymPy methods, but do not want to pollute the frontend at the wrong places. I think this is similar to custom NumPy methods that we support (or will support). |
As Anutosh said, the constant like pi will be treated as variable and it is not declared in current scope, the same goes for function call as well.
|
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.
I don't know how to improve it. We need this feature, so let's merge this for now. We might need to improve it later, once we know how.
I realize that we couldn't access attributes or query methods without assigning the expression to a variable beforehand.
So this works
But these cases don't