From 2b1a1175b41c07d2971fb626556bec32b9b55308 Mon Sep 17 00:00:00 2001 From: Travis Scrimshaw Date: Sat, 2 Jan 2016 02:53:17 -0600 Subject: [PATCH] Changed libs.gap.element.GapElement.matrix() to avoid matrix constructor. --- src/sage/libs/gap/element.pyx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sage/libs/gap/element.pyx b/src/sage/libs/gap/element.pyx index a9a39ad224e..ffc3c7c6b53 100644 --- a/src/sage/libs/gap/element.pyx +++ b/src/sage/libs/gap/element.pyx @@ -1098,10 +1098,11 @@ cdef class GapElement(RingElement): m = len(entries) // n if len(entries) % n != 0: raise ValueError('not a rectangular list of lists') - from sage.matrix.constructor import matrix + from sage.matrix.matrix_space import MatrixSpace if ring is None: ring = entries.DefaultRing().sage() - return matrix(ring, n, m, [ x.sage(ring=ring) for x in entries ]) + MS = MatrixSpace(ring, n, m) + return MS([x.sage(ring=ring) for x in entries]) _matrix_ = matrix