numpy compare two arrays code example
Example 1: numpy compare arrays
bool isEqual = numpy.array_equal(Array1, Array2)
Example 2: check if numpy arrays are equal
(A==B).all()
Example 3: numpy array_equal
numpy.array_equal(array1, array2)
True if two arrays have the same shape and elements, False otherwise.
Example 4: np.array_equal
# np.array_equal checks whether two arrays have the same
# shape and all elements values