Skip to content

dividing a sparse matrix by a scalar gives a dense matrix, but multiplying gives a sparse one #5032

@williamstein

Description

@williamstein

This is a bug:

sage: A = matrix(ZZ, 2, [1..4], sparse=True)
sage: type(A*1)
<type 'sage.matrix.matrix_integer_sparse.Matrix_integer_sparse'>
sage: type(A/1)
<type 'sage.matrix.matrix_rational_dense.Matrix_rational_dense'>

Component: linear algebra

Issue created by migration from https://trac.sagemath.org/ticket/5032

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions