Skip to content

Commit

Permalink
src/sage/modules/free_module_element.pyx: No else after return
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoeppe committed Jun 2, 2024
1 parent 89aecfd commit 2eb5de8
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/sage/modules/free_module_element.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -986,13 +986,12 @@ cdef class FreeModuleElement(Vector): # abstract base class
base_ring = self.parent().base_ring()
if self.parent().is_ambient() and base_ring == self.parent().coordinate_ring():
return self.dict(copy=copy)
else:
coordinates = self.parent().coordinate_vector(self)
# coordinate_vector returns coefficients in the fraction field.
# convert back to the base ring.
return {index: base_ring(value)
for index, value in enumerate(coordinates)
if value}
coordinates = self.parent().coordinate_vector(self)
# coordinate_vector returns coefficients in the fraction field.
# convert back to the base ring.
return {index: base_ring(value)
for index, value in enumerate(coordinates)
if value}

def _giac_init_(self):
"""
Expand Down

0 comments on commit 2eb5de8

Please sign in to comment.