def __eq__(self, mesh, tol=1.0E-7):
        """
        Compares the mesh with another returning True if all elements are
        equal to within the specific tolerance, False otherwise

        :param mesh:
            Mesh for comparison as instance of :class:
            openquake.hazardlib.geo.mesh.Mesh

        :param float tol:
            Numerical precision for equality
        """
        if self.shape != mesh.shape:
            return False
        elif len(self.array) != len(mesh.array):  # 3D vs 2D arrays
            ok = (numpy.allclose(self.array[0], mesh.array[0], atol=tol) and
                  numpy.allclose(self.array[1], mesh.array[1], atol=tol))
            if len(self.array) == 2:
                return ok and (mesh.array[2] == 0).all()
            elif len(mesh.array) == 2:
                return ok and (self.array[2] == 0).all()
        return numpy.allclose(self.array, mesh.array, atol=tol)
def __eq__ ( self , mesh , tol = 1.0E-7 ) : if self . shape != mesh . shape : return False elif len ( self . array ) != len ( mesh . array ) : ok = ( numpy . allclose ( self . array [ 0 ] , mesh . array [ 0 ] , atol = tol ) and numpy . allclose ( self . array [ 1 ] , mesh . array [ 1 ] , atol = tol ) ) if len ( self . array ) == 2 : return ok and ( mesh . array [ 2 ] == 0 ) . all ( ) elif len ( mesh . array ) == 2 : return ok and ( self . array [ 2 ] == 0 ) . all ( ) return numpy . allclose ( self . array , mesh . array , atol = tol )
Compares the mesh with another returning True if all elements are
        equal to within the specific tolerance, False otherwise

        :param mesh:
            Mesh for comparison as instance of :class:
            openquake.hazardlib.geo.mesh.Mesh

        :param float tol:
            Numerical precision for equality