Merged
Conversation
james-d-mitchell
approved these changes
Apr 17, 2026
Contributor
james-d-mitchell
left a comment
There was a problem hiding this comment.
Looks good, one minor comment
| m := NrRows(mat); | ||
| if m = 0 or m <> NrCols(mat) then | ||
| Error( "<mat> must be a square matrix at least 1x1" ); | ||
| if m = 0 or not IsRectangularTable(mat) or m <> NrCols(mat) then |
Contributor
There was a problem hiding this comment.
Maybe better to leave the 1x1 in the error message?
Member
Author
There was a problem hiding this comment.
Agreed.
Ideally we should simply support the determinant of 0x0 matrices (by the usual definitions, it must be equal to 1). But of course we can only do that for "true" matrixobj, where we know the underlying ring; for lists-of-lists, an "empty" matrix is just an empty list and we don't know over which ring it is.
Reject ragged inputs before determinant dispatch. Fixes #5264 Co-authored-by: Codex <codex@openai.com>
2bb5e67 to
59e45c1
Compare
ThomasBreuer
added a commit
to ThomasBreuer/gap
that referenced
this pull request
Apr 20, 2026
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.
Fixes #5264
Co-authored-by: Codex codex@openai.com