Return the next representable floating-point value after x1 in the direction of x2 element-wise.
Parameters: | x1 : array_like
x2 : array_like
out : ndarray, optional
|
---|---|
Returns: | out : array_like
|
Examples
>>> eps = np.finfo(np.float64).eps
>>> np.nextafter(1, 2) == eps + 1
True
>>> np.nextafter([1, 2], [2, 1]) == [eps + 1, 2 - eps]
array([ True, True], dtype=bool)