def approx_contains(self, other, atol):
        """Test if ``other`` belongs to this grid up to a tolerance.

        Parameters
        ----------
        other : `array-like` or float
            The object to test for membership in this grid
        atol : float
            Allow deviations up to this number in absolute value
            per vector entry.

        Examples
        --------
        >>> g = RectGrid([0, 1], [-1, 0, 2])
        >>> g.approx_contains([0, 0], atol=0.0)
        True
        >>> [0, 0] in g  # equivalent
        True
        >>> g.approx_contains([0.1, -0.1], atol=0.0)
        False
        >>> g.approx_contains([0.1, -0.1], atol=0.15)
        True
        """
        other = np.atleast_1d(other)
        return (other.shape == (self.ndim,) and
                all(np.any(np.isclose(vector, coord, atol=atol, rtol=0.0))
                    for vector, coord in zip(self.coord_vectors, other)))
def approx_contains ( self , other , atol ) : other = np . atleast_1d ( other ) return ( other . shape == ( self . ndim , ) and all ( np . any ( np . isclose ( vector , coord , atol = atol , rtol = 0.0 ) ) for vector , coord in zip ( self . coord_vectors , other ) ) )
Test if ``other`` belongs to this grid up to a tolerance.

        Parameters
        ----------
        other : `array-like` or float
            The object to test for membership in this grid
        atol : float
            Allow deviations up to this number in absolute value
            per vector entry.

        Examples
        --------
        >>> g = RectGrid([0, 1], [-1, 0, 2])
        >>> g.approx_contains([0, 0], atol=0.0)
        True
        >>> [0, 0] in g  # equivalent
        True
        >>> g.approx_contains([0.1, -0.1], atol=0.0)
        False
        >>> g.approx_contains([0.1, -0.1], atol=0.15)
        True