Skip to content

LU errors out for sparse matrices over inexact fields #36465

@maxale

Description

@maxale

Steps To Reproduce

In the following code A.LU() works fine, but B.LU() errors out.

A = random_matrix(RDF,4)
print(A.LU())
B = A.sparse_matrix()
print(B.LU())

Expected Behavior

.LU() should work for both dense and sparse matrices.

Actual Behavior

The following error is produced:

TypeError: base ring of the matrix must be exact, not Real Double Field

which is quite weird given that this was not an issue for matrix A also defined over RDF.

Additional Information

No response

Environment

- **OS**: Ubuntu 22.04.3 LTS
- **Sage Version**: 10.2.beta5

Checklist

  • I have searched the existing issues for a bug report that matches the one I want to file, without success.
  • I have read the documentation and troubleshoot guide

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions