Skip to content

Commit

Permalink
WIP37
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin committed Jul 27, 2023
1 parent 0df0956 commit d8b7bc0
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/sage/libs/gap/element.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,12 @@ cdef Obj make_gap_list(sage_list) except NULL:
"""
cdef Obj l
cdef GapElement elem
cdef int i
try:
GAP_Enter()
l = GAP_NewPlist(0)

for x in sage_list:
for i, x in enumerate(sage_list):
if not isinstance(x, GapElement):
elem = <GapElement>libgap(x)
else:
Expand Down Expand Up @@ -86,15 +87,17 @@ cdef Obj make_gap_matrix(sage_list, gap_ring) except NULL:
cdef Obj l
cdef GapElement elem
cdef GapElement one
cdef int i
if gap_ring is not None:
one = <GapElement>gap_ring.One()
else:
one = <GapElement>libgap(1)

try:
GAP_Enter()
l = GAP_NewPlist(0)

if gap_ring is not None:
one = <GapElement>gap_ring.One()
else:
one = <GapElement>libgap(1)
for x in sage_list:
for i, x in enumerate(sage_list):
if not isinstance(x, GapElement):
elem = <GapElement>libgap(x)
elem = elem * one
Expand Down

0 comments on commit d8b7bc0

Please sign in to comment.