sympy_gamma
sympy_gamma copied to clipboard
Improper handling of plot for constant function
In case of plotting constant function instead of producing a horizontal line as output, sympygamma was redirected to error page. And because of this, there was an error when plotting an expression that results in constant term.
IMO, this can be improved by using updated modules from sympy rather than using the currently used modules.
This appears to have been fixed with the new upgrade to Python 3?
What would you type into sympy gamma to test this?
plot(y=3)
Seems to be what they were implying, though admittedly my testing was not extremely thorough.
After a little more testing I see what the issue is: The system can't handle things like plot(3) so if the user is entering things that they don't know simplify to a constant (e.g. (plot((2x+3)-2x)), they get an unhelpful error. If they had instead entered plot(y=(2x+3)-2x) they receive the proper plot, but in the long run this seems to put too much syntax burden on the user for a system patterned on the "natural language/Wolfram" model.
I'm new to open source. Does this seem like a good first issue to contribute on?
I poked around in the code and I'm worried I might come up against a foundational issue because it seems like the decision was made to have the system "forget" about the variables in the expression the user originally typed before generating the cards. My first thought to resolve it would have been to check whether the parser had detected variables, and prefer the plot if variables were present.
It could be a good first issue. I don't know the sympy gamma codebase at all and I'm not sure who can advise. Maybe @aktech?