Convenience wrapper around np.isclose.
541699
def _isclose(a: Any, b: Any, *, atol: Union[int, float]) -> bool:
    """"""
    return True if np.isclose([a], [b], atol=atol, rtol=0.0)[0] else False
592425
def canClose(self):
        
        for view in self.findChildren(XView):
            if not view.canClose():
                return False
        return True
1348000
def is_fp_closed(obj):
    

    try:
        # Check `isclosed()` first, in case Python3 doesn't set `closed`.
        # GH Issue #928
        return obj.isclosed()
    except AttributeError:
        pass

    try:
        # Check via the official file-like-object way.
        return obj.closed
    except AttributeError:
        pass

    try:
        # Check if the object is a container for another file-like object that
        # gets released on exhaustion (e.g. HTTPResponse).
        return obj.fp is None
    except AttributeError:
        pass

    raise ValueError("Unable to determine whether fp is closed.")
20892
def _confirm_constant(a):
    """"""
    a = np.asanyarray(a)
    return np.isclose(a, 1.0).all(axis=0).any()
1254524
function (code) {
              if (isLast) {
                if (code) {
                  reject(result)
                } else {
                  resolve(result)
                }
                return
              }
              var nextClose = pipes[idx + 1] && pipes[idx + 1].close
              if (nextClose) {
                nextClose()
              }
            }
124510
def closeParagraph(self, mLastSection):
		""""""
		result = u''
		if mLastSection != u'':
			result = u'</' + mLastSection + u'>\n'

		return result
874616
def set_is_closed(self, value):
        
        if value is None or not isinstance(value, bool):
            raise TypeError("IsClosed must be set to a bool")
        else:
            self.__is_closed = value
412020
public static void safeClose(@Nullable Object object) {
		if (object instanceof Closeable) {
			try {
				((Closeable) object).close();
			} catch (IOException e) {
				Exceptions.ignore(e);
			}
		}
	}
966559
def EncloseAnsiText(text):
  """"""
  return sgr_re.sub(lambda x: ANSI_START + x.group(1) + ANSI_END, text)
1225017
def densities_close(rho0: Density, rho1: Density,
                    tolerance: float = TOLERANCE) -> bool:
    
    return vectors_close(rho0.vec, rho1.vec, tolerance)
906352
def isclose(a, b, rtol=1e-5, atol=1e-8):
    """"""
    return abs(a - b) < (atol + rtol * abs(b))
917208
def allclose_or_equiv(arr1, arr2, rtol=1e-5, atol=1e-8):
    
    arr1, arr2 = as_like_arrays(arr1, arr2)
    if arr1.shape != arr2.shape:
        return False
    return bool(
        isclose(arr1, arr2, rtol=rtol, atol=atol, equal_nan=True).all())
1295733
static <T> FluentCloseableIterable<T> wrap(final Iterable<T> iterable, final AutoCloseable closeable) {
        return new FluentCloseableIterable<T>() {
            @Override
            protected void doClose() {
                try {
                    closeable.close();
                } catch (RuntimeException re) {
                    throw re;
                } catch (Exception e) {
                    throw new IllegalStateException(e);
                }
            }

            @Override
            protected Iterator<T> retrieveIterator() {
                return iterable.iterator();
            }
        };
    }
376041
public static boolean shouldClosePath(VectorTile.Tile.GeomType geomType) {
        final boolean closeReq;

        switch(geomType) {
            case POLYGON:
                closeReq = true;
                break;
            default:
                closeReq = false;
                break;
        }

        return closeReq;
    }
1242830
def points_close(a,b):
    '''
    
    '''
    (a,b) = [np.asarray(u) for u in (a,b)]
    if len(a.shape) == 2 or len(b.shape) == 2: (a,b) = [np.reshape(u,(len(u),-1)) for u in (a,b)]
    return np.isclose(np.sqrt(np.sum((a - b)**2, axis=0)), 0)
1149536
def openclosed(lower_value, upper_value):
    
    return Interval(Interval.OPEN, lower_value, upper_value, Interval.CLOSED)
837002
def is_regular(self):
        
        if self.size <= 1:
            return False
        return numpy.isclose(numpy.diff(self.value, n=2), 0).all()