right way to compare 2 numpy arrays boolean code example Example: check if numpy arrays are equal (A==B).all()