Skip to content
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

Avoid ceil, floor from sage.functions.other in non-symbolic uses #32731

Closed
mkoeppe opened this issue Oct 21, 2021 · 16 comments
Closed

Avoid ceil, floor from sage.functions.other in non-symbolic uses #32731

mkoeppe opened this issue Oct 21, 2021 · 16 comments

Comments

@mkoeppe
Copy link
Contributor

mkoeppe commented Oct 21, 2021

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

@mkoeppe mkoeppe added this to the sage-9.5 milestone Oct 21, 2021
@mkoeppe
Copy link
Contributor Author

mkoeppe commented Oct 21, 2021

Dependencies: #32717

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Oct 21, 2021

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 21, 2021

Commit: 57551d3

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 21, 2021

Branch pushed to git repo; I updated commit sha1. New commits:

00f5615src/sage/graphs/hyperbolicity.pyx: Remove unused import
27b44b9src/sage/modular/pollack_stevens/dist.pyx: Remove unused import
7f1d021src/sage/quadratic_forms/ternary.pyx: Remove unused import
d5cfe2asrc/sage/combinat/crystals/tensor_product_element.pyx: Remove unused import
d825aa8src/sage/combinat/crystals/littelmann_path.py: Use integer_floor instead of sage.functions.other.floor
9c35213src/sage/combinat/diagram_algebras.py: Use integer_floor, integer_ceil instead of importing from sage.functions
57551d3src/sage/graphs/generic_graph.py: Use integer_floor instead of sage.functions.other.floor

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Oct 21, 2021

Author: Matthias Koeppe

@tscrim
Copy link
Collaborator

tscrim commented Oct 24, 2021

comment:5

LGTM.

@tscrim
Copy link
Collaborator

tscrim commented Oct 24, 2021

Reviewer: Travis Scrimshaw

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Oct 24, 2021

comment:6

Thank you!

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 25, 2021

Changed commit from 57551d3 to bed7308

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 25, 2021

Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:

bed7308src/sage/geometry/polyhedron/base.py: Remove stray character

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 26, 2021

Changed commit from bed7308 to 33a2e7b

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 26, 2021

Branch pushed to git repo; I updated commit sha1. New commits:

33a2e7bsrc/sage/geometry/polyhedron/base.py: Fix up imports

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Oct 26, 2021

comment:9

Waiting for another round of the patchbot.

@tscrim
Copy link
Collaborator

tscrim commented Oct 26, 2021

comment:10

The failure in src/sage/libs/flint/nmod_poly_linkage.pxi seems unrelated.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Oct 26, 2021

comment:11

Thank you (again)!

@vbraun
Copy link
Member

vbraun commented Oct 31, 2021

mkoeppe added a commit to mkoeppe/sage that referenced this issue Feb 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants