X-Git-Url: http://gitweb.michael.orlitzky.com/?p=sage.d.git;a=blobdiff_plain;f=mjo%2Fmatrix_algebra.py;h=69d9aebcabfd566bf95b797ec20444629c62c14f;hp=29a37d1e7c9bdee3dee6b36960126d5f545753fe;hb=d2136d7696349ee48790818ed3927cbd9464e342;hpb=9c7fc4d836d337fcba8846ee4538bb0571c60f08 diff --git a/mjo/matrix_algebra.py b/mjo/matrix_algebra.py index 29a37d1..69d9aeb 100644 --- a/mjo/matrix_algebra.py +++ b/mjo/matrix_algebra.py @@ -60,15 +60,16 @@ class MatrixAlgebraElement(IndexedFreeModuleElement): TESTS:: sage: MatrixAlgebra(0,ZZ,ZZ).zero() - 0 + [] """ if self.nrows() == 0 or self.ncols() == 0: - # Otherwise we get a crash or a blank space, depending - # on how hard we work for it. - return self.parent().entry_algebra().zero().__repr__() + # Otherwise we get a crash or a blank space, depending on + # how hard we work for it. This is what MatrixSpace(..., + # 0) returns. + return "[]" - return table(rs, frame=True)._repr_() + return table(self.rows(), frame=True)._repr_() def list(self):