import sympy
I am trying to find a matrix after taking each of its values (mod n). I know numpy arrays work fine with this but i have to use sympy unfortunately. Does anyone know of an inbuilt sympy function that does this or any other way round it? Thank you!
B = sympy.Matrix([[2, 3], [4, 5]])
print(B % 3)
This is my error
TypeError: unsupported operand type(s) for %: 'MutableDenseMatrix' and 'int'
with numpy this is the correct output:
B = np.array([[2, 3], [4, 5]])
print(B % 3)
>>> [[2 0]
[1 2]]