Ticket #5193 (closed defect: fixed)
[with patch, positive review] maximum allowed matrix size is too big
| Reported by: | cwitty | Owned by: | was |
|---|---|---|---|
| Priority: | minor | Milestone: | sage-3.3 |
| Component: | linear algebra | Keywords: | |
| Cc: | Work issues: | ||
| Report Upstream: | Reviewers: | ||
| Authors: | Merged in: | ||
| Dependencies: | Stopgaps: |
Description
On a 32-bit computer, MatrixSpace will let you create a matrix space with up to 232-1 rows or columns. But we use Py_ssize_t for matrix indices, which can only hold numbers up to 231-1.
Patch attached; all doctests pass on a 64-bit computer, and .../matrix_space.py doctests pass on a 32-bit computer.
Attachments
Change History
comment:1 Changed 4 years ago by jason
I think the reasoning is that Py_ssize_t is a signed integer to allow for negative indices.
comment:2 Changed 4 years ago by jason
- Summary changed from [with patch, needs review] maximum allowed matrix size is too big to [with patch, positive review] maximum allowed matrix size is too big
Yep, the reasoning is explained in the patch. Doctests in matrixspace.py pass on my 32 bit computer. Positive review.
Note: See
TracTickets for help on using
tickets.

