Repository navigation
Conversation
Comment on lines
+70
to
+80
| from flint import fmpq_mat, fmpz_mat | ||
|
|
||
| A = fmpz_mat([[0, 1, 2], [3, 4, 5], [6, 7, 8]]) | ||
| R, d, r = A.rref() | ||
| B = fmpq_mat(R) / d | ||
|
|
||
| For this matrix, the :meth:`~flint.fmpz_mat.rref` example gives | ||
|
|
||
| .. math:: | ||
|
|
||
| R = \begin{pmatrix} |
Collaborator
There was a problem hiding this comment.
It would be better for this to be a doctest that displays the value of B.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fmpz_mat.rref()returns an integer numerator, a denominator and the rank. Its docstring lists these values without explicitly stating that the rational RREF isR/d.Add a guide explaining the scaled pivots, the unreduced common denominator and
inplace=True. Interpret the existing 3-by-3 example with a row-space argument, show conversion tofmpq_matand its two-valuerref()interface, and distinguish rational row reduction from preservation of the integer row lattice. Link to the FLINT RREF contract.Related to #198; the guide describes the current API.
Validation:
gr_ctx.factor. Neither is a clean strict build. The guide adds no warning.-b html -W --keep-going -E -a, Python 3.12.3, Sphinx 9.1.1 and Furo 2025.12.19. Autodoc imported the published python-flint 0.9.0 package; the native checkout was not rebuilt.