---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
/usr/lib/python3.9/site-packages/sage/matrix/matrix0.pyx in sage.matrix.matrix0.Matrix.inverse_of_unit (build/cythonized/sage/matrix/matrix0.c:38486)()
5758 try:
-> 5759 return (~self.lift_centered()).change_ring(R)
5760 except (TypeError, ZeroDivisionError):
/usr/lib/python3.9/site-packages/sage/matrix/matrix_rational_dense.pyx in sage.matrix.matrix_rational_dense.Matrix_rational_dense.change_ring (build/cythonized/sage/matrix/matrix_rational_dense.cpp:14919)()
1493 if not b.gcd(d).is_one():
-> 1494 raise TypeError("matrix denominator not coprime to modulus")
1495 B = A._mod_int(b)
TypeError: matrix denominator not coprime to modulus
During handling of the above exception, another exception occurred:
ZeroDivisionError Traceback (most recent call last)
/tmp/ipykernel_28418/145294746.py in <module>
----> 1 C**-Integer(1)
/usr/lib/python3.9/site-packages/sage/matrix/matrix0.pyx in sage.matrix.matrix0.Matrix.__pow__ (build/cythonized/sage/matrix/matrix0.c:39296)()
5842 from sage.matrix.matrix2 import _matrix_power_symbolic
5843 return _matrix_power_symbolic(self, n)
-> 5844 return generic_power(self, n)
5845
5846 ###################################################
/usr/lib/python3.9/site-packages/sage/arith/power.pyx in sage.arith.power.generic_power (build/cythonized/sage/arith/power.c:2434)()
81 raise NotImplementedError("non-integral exponents not supported")
82 if not err:
---> 83 return generic_power_long(a, value)
84
85 if n < 0:
/usr/lib/python3.9/site-packages/sage/arith/power.pyx in sage.arith.power.generic_power_long (build/cythonized/sage/arith/power.c:2708)()
99 if n < 0:
100 u = -u
--> 101 a = invert(a)
102 return generic_power_pos(a, u)
103
/usr/lib/python3.9/site-packages/sage/arith/power.pxd in sage.arith.power.invert (build/cythonized/sage/arith/power.c:3747)()
18 """
19 if isinstance(a, Element):
---> 20 return ~a
21 return PyNumber_TrueDivide(type(a)(1), a)
22
/usr/lib/python3.9/site-packages/sage/matrix/matrix0.pyx in sage.matrix.matrix0.Matrix.__invert__ (build/cythonized/sage/matrix/matrix0.c:37470)()
5643 return ~self.matrix_over_field()
5644 else:
-> 5645 return self.inverse_of_unit()
5646 else:
5647 A = self.augment(self.parent().identity_matrix())
/usr/lib/python3.9/site-packages/sage/matrix/matrix0.pyx in sage.matrix.matrix0.Matrix.inverse_of_unit (build/cythonized/sage/matrix/matrix0.c:38533)()
5759 return (~self.lift_centered()).change_ring(R)
5760 except (TypeError, ZeroDivisionError):
-> 5761 raise ZeroDivisionError("input matrix must be nonsingular")
5762 elif algorithm is None and is_IntegerRing(R):
5763 try:
ZeroDivisionError: input matrix must be nonsingular