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

Commit

Permalink
src/sage/modules/free_module.py: Remove another use of is_... functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Oct 2, 2021
1 parent b8691cc commit abbe26d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/sage/modules/free_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@
from sage.modules.module import Module
import sage.rings.finite_rings.finite_field_constructor as finite_field
import sage.rings.ring as ring
import sage.rings.abc
import sage.rings.integer_ring
import sage.rings.rational_field
import sage.rings.finite_rings.integer_mod_ring
Expand Down Expand Up @@ -7443,9 +7444,9 @@ def element_class(R, is_sparse):
return Vector_modn_dense
else:
return free_module_element.FreeModuleElement_generic_dense
elif sage.rings.real_double.is_RealDoubleField(R) and not is_sparse:
elif isinstance(R, sage.rings.abc.RealDoubleField) and not is_sparse:
return sage.modules.vector_real_double_dense.Vector_real_double_dense
elif sage.rings.complex_double.is_ComplexDoubleField(R) and not is_sparse:
elif isinstance(R, sage.rings.abc.ComplexDoubleField) and not is_sparse:
return sage.modules.vector_complex_double_dense.Vector_complex_double_dense
elif sage.symbolic.ring.is_SymbolicExpressionRing(R) and not is_sparse:
import sage.modules.vector_symbolic_dense
Expand Down

0 comments on commit abbe26d

Please sign in to comment.