Opened 4 years ago
Closed 4 years ago
#26757 closed enhancement (fixed)
py3: fixing round in graph_latex.py
Reported by: | David Coudert | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-8.5 |
Component: | python3 | Keywords: | py3, graph |
Cc: | Travis Scrimshaw, Frédéric Chapoton | Merged in: | |
Authors: | David Coudert | Reviewers: | Travis Scrimshaw |
Report Upstream: | N/A | Work issues: | |
Branch: | d1888e4 (Commits, GitHub, GitLab) | Commit: | d1888e4f90adfdda9194193d2539988cbc6051c2 |
Dependencies: | Stopgaps: |
Description (last modified by )
Several round
are failing in graph_latex.py
as RealNumber
does not define round
.
TypeError: type sage.rings.real_mpfr.RealNumber doesn't define __round__ method
We fix that using round(float(...))
.
Change History (5)
comment:1 Changed 4 years ago by
Branch: | → public/26757_round_in_graph_latex |
---|---|
Cc: | Travis Scrimshaw Frédéric Chapoton added |
Commit: | → d1888e4f90adfdda9194193d2539988cbc6051c2 |
Description: | modified (diff) |
Status: | new → needs_review |
comment:2 Changed 4 years ago by
I wonder if this is the correct fix. We might loose precision, and it seems natural that RealNumber
would define a __round__
(or round
). Thoughts?
comment:3 Changed 4 years ago by
I followed what has been done in #26684. Of course, it would be better to get a __round__
method for RealNumber
.
comment:4 Changed 4 years ago by
Reviewers: | → Travis Scrimshaw |
---|---|
Status: | needs_review → positive_review |
Okay, fair enough. LGTM.
comment:5 Changed 4 years ago by
Branch: | public/26757_round_in_graph_latex → d1888e4f90adfdda9194193d2539988cbc6051c2 |
---|---|
Resolution: | → fixed |
Status: | positive_review → closed |
Note: See
TracTickets for help on using
tickets.
New commits:
trac #26757: fixing round in graph_latex.py