Avoid ceil, floor from sage.functions.other in non-symbolic uses
Closed this issue · 16 comments
floor(.../...) can be rewritten as integer division ...//...
Other uses can be replaced by integer_ceil, integer_floor from sage.arith.misc
Depends on #32717
Component: refactoring
Author: Matthias Koeppe
Branch/Commit: 33a2e7b
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/32731
Commit: 57551d3
Branch pushed to git repo; I updated commit sha1. New commits:
00f5615 | src/sage/graphs/hyperbolicity.pyx: Remove unused import |
27b44b9 | src/sage/modular/pollack_stevens/dist.pyx: Remove unused import |
7f1d021 | src/sage/quadratic_forms/ternary.pyx: Remove unused import |
d5cfe2a | src/sage/combinat/crystals/tensor_product_element.pyx: Remove unused import |
d825aa8 | src/sage/combinat/crystals/littelmann_path.py: Use integer_floor instead of sage.functions.other.floor |
9c35213 | src/sage/combinat/diagram_algebras.py: Use integer_floor, integer_ceil instead of importing from sage.functions |
57551d3 | src/sage/graphs/generic_graph.py: Use integer_floor instead of sage.functions.other.floor |
Author: Matthias Koeppe
LGTM.
Reviewer: Travis Scrimshaw
Thank you!
Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:
bed7308 | src/sage/geometry/polyhedron/base.py: Remove stray character |
Branch pushed to git repo; I updated commit sha1. New commits:
33a2e7b | src/sage/geometry/polyhedron/base.py: Fix up imports |
Waiting for another round of the patchbot.
The failure in src/sage/libs/flint/nmod_poly_linkage.pxi seems unrelated.
Thank you (again)!
Changed branch from u/mkoeppe/avoid_ceil__floor_from_sage_functions_other_in_non_symbolic_uses to 33a2e7b