Opened 22 months ago
Closed 22 months ago
#26757 closed enhancement (fixed)
py3: fixing round in graph_latex.py
Reported by: | dcoudert | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-8.5 |
Component: | python3 | Keywords: | py3, graph |
Cc: | tscrim, chapoton | Merged in: | |
Authors: | David Coudert | Reviewers: | Travis Scrimshaw |
Report Upstream: | N/A | Work issues: | |
Branch: | d1888e4 (Commits) | 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 22 months ago by
- Branch set to public/26757_round_in_graph_latex
- Cc tscrim chapoton added
- Commit set to d1888e4f90adfdda9194193d2539988cbc6051c2
- Description modified (diff)
- Status changed from new to needs_review
comment:2 Changed 22 months 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 22 months 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 22 months ago by
- Reviewers set to Travis Scrimshaw
- Status changed from needs_review to positive_review
Okay, fair enough. LGTM.
comment:5 Changed 22 months ago by
- Branch changed from public/26757_round_in_graph_latex to d1888e4f90adfdda9194193d2539988cbc6051c2
- Resolution set to fixed
- Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
New commits:
trac #26757: fixing round in graph_latex.py