Numpy numpy.matrix.all () method, we can compare each element of one matrix to another, or we can provide the axis to which we want to apply the comparison .
Return: Return true if found match else false
Example # 1:
In this example, we see that using the method
matrix.all () we can compare any two matrices that have different dimensions.
Example # 2: