-
-
Notifications
You must be signed in to change notification settings - Fork 528
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
Make sure symbolic gridline values are okay #10980
Comments
comment:1
Update: perhaps this is something that could be considered an upstream bug - or a bug that we give a |
comment:2
Update: From the question, Jason says
Changing to 'not yet reported upstream'. |
Upstream: Not yet reported upstream; Will do shortly. |
comment:3
We'll still have to include a fix, of course; an mpl change will just make sure the error is caught earlier by them, but we should be making sure we turn sqrt(2) into something plottable. |
comment:4
It is reported: http://thread.gmane.org/gmane.comp.python.matplotlib.devel/10009 |
Changed upstream from Not yet reported upstream; Will do shortly. to Reported upstream. Little or no feedback. |
comment:5
Committed to matplotlib master here: Since this has a likelihood of accidental breakage, this is not on the bugfix branch. |
Changed upstream from Reported upstream. Little or no feedback. to none |
comment:6
So what now? This bug had three causes: (1) we weren't passing floats, (2) symbolic expressions have a (3) is fixed upstream and we'll eventually pick it up, which leaves (1) and (2). Should we fix (1) here and open a new ticket to fix (2)? |
Upstream: Fixed upstream, but not in a stable release. |
comment:7
Replying to @sagetrac-dsm:
Yes, we fix (1) here. I don't think that (2) necessarily has to be fixed, as long as we're aware of it. It's presumably been around a while, and we'd have to deprecate it. Though of course
seems reasonable... Changing the upstream report. NA is only if literally NA. In this case, there were a couple things going on, so not NA; according to the post above, it's fixed but not yet in the bugfix branch i.e. stable release. |
comment:8
Replying to @kcrisman:
Oops! That wasn't intended. I couldn't decide if it counted as a stable or unstable release, and I guess I set it to NA instead of restoring it. [I find it surprisingly easy to make errors on trac. I think I've assigned a couple of tickets to myself now..] As for the len issue, I'm inclined to agree with Jason that it should go. If there's no interpretation of iter(sqrt(x)) natural enough to be canonical, then IMHO len(sqrt(2)) shouldn't work either. OTOH if we think that it's natural that len(sqrt(2)) should be two, because len counts the operands, then list(sqrt(2)) should be list((sqrt(2)).operands()) and give [2, 1/2]. That goes against my instincts, because I'd assume that taking the len of an expression, or iterating over it, would work over the "terms" of an expression. But len(x) == 0, because there are no operations so there are no operands, which is completely consistent but isn't what I'd have expected. I don't think it's important enough for me to learn how Sage deprecation policies work, though, given that I'm still having trouble counting colons. |
comment:9
This does actually work now, by the way.
This doesn't resolve the issue of whether symbolic things should have a
But this has been in for at least three years (the Pynac switch). |
Changed upstream from Fixed upstream, but not in a stable release. to Fixed upstream, in a later stable release. |
comment:11
Replying to @kcrisman:
so, should this go to a closed state? or instead go to a need_work state? in my opinion it should move to a sage-devel discussion before |
comment:12
I'm a beginner, and found this too hard! |
comment:13
This is fixed now, so it just needs a doctest added. |
Changed upstream from Fixed upstream, in a later stable release. to none |
This comment has been minimized.
This comment has been minimized.
comment:14
To close this ticket, we just need a doctest that checks whether the example in the description gives good output, instead of an error. The discussion of whether symbolic expressions should have a length has been moved to #29738. |
Commit: |
comment:17
Thanks for fixing this. Please add your (real) name in the New commits:
|
comment:18
This line
should be
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
Author: Atte Niemi |
comment:21
The correction is not right, because the second colon needs to come immediately after "trac", not at the end:
not
It needs to be done this way so that |
comment:23
Moving this ticket to 9.4, as it seems unlikely that it will be merged in 9.3, which is in the release candidate stage |
comment:24
Setting a new milestone for this ticket based on a cursory review. |
Reviewer: Dave Morris |
Changed branch from u/gh-hur/make_sure_symbolic_gridline_values_are_okay to public/10980 |
Changed branch from public/10980 to |
From this ask.sagemath.org question.
blows up.
The fix is probably to make sure that symbolic input with a
n()
method passes something right to matplotlib, which of course cannot handlesqrt(2)
. Possibly beginner ticket.Note: A beginner who is interested in working on this ticket can skip down to comment:13.
CC: @jasongrout @sagetrac-dsm
Component: graphics
Author: Atte Niemi
Branch/Commit:
702d272
Reviewer: Dave Morris
Issue created by migration from https://trac.sagemath.org/ticket/10980
The text was updated successfully, but these errors were encountered: