Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
src/sage/matrix/matrix_space.py (get_matrix_class): Handle base_ring=…
Browse files Browse the repository at this point in the history
…ZZ, implementation='numpy'
  • Loading branch information
Matthias Koeppe committed Feb 19, 2022
1 parent fe1da0a commit 007253d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/sage/matrix/matrix_space.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,10 @@ def get_matrix_class(R, nrows, ncols, sparse, implementation):
if R is sage.rings.complex_double.CDF:
from . import matrix_complex_double_dense
return matrix_complex_double_dense.Matrix_complex_double_dense
raise ValueError("'numpy' matrices are only available over RDF and CDF")
if R is sage.rings.integer_ring.ZZ:
from . import matrix_numpy_integer_dense
return matrix_numpy_integer_dense.Matrix_numpy_integer_dense
raise ValueError("'numpy' matrices are only available over RDF, CDF, and ZZ")

if implementation == 'rational':
if isinstance(R, sage.rings.abc.NumberField_cyclotomic):
Expand Down

0 comments on commit 007253d

Please sign in to comment.