I am working on an Image Convolution code using numpy:
def CG(A, b, x, imax=10, epsilon = 0.01):
steps=np.asarray(x)
i = 0
r = b - A * x
d =
delta_new is a matrix. Linear arithmetic comparison operations are not defined for matrices. You tried to compare a matrix of values to another matrix of values with a simple scalar comparison. Python doesn't know how to give you a single T/F result from this.
I suspect that you want some scalar property on the matrices, such as determinant.