Ticket #5193 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

[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

fix-max-matrix-size.patch Download (2.3 KB) - added by cwitty 4 years ago.

Change History

Changed 4 years ago by cwitty

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.

comment:3 Changed 4 years ago by mabshoff

  • Status changed from new to closed
  • Resolution set to fixed

Merged in Sage 3.3.alpha6.

Cheers,

Michael

Note: See TracTickets for help on using tickets.