Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(59)  |  Call(59)  |  Derive(0)  |  Import(0)
nextafter(x1, x2[, out])

Return the next floating-point value after x1 towards x2, element-wise.

Parameters
----------
x1 : array_like
    Values to find the next representable value of.
x2 : array_like
    The direction where to look for the next representable value of `x1`.(more...)

src/n/u/nupic-linux64-HEAD/lib64/python2.6/site-packages/matplotlib/colors.py   nupic-linux64(Download)
        if xa.dtype.char in np.typecodes['Float']:
            # Treat 1.0 as slightly less than 1.
            cbook._putmask(xa, xa==1.0, np.nextafter(xa.dtype.type(1),
                                                     xa.dtype.type(0)))
            # The following clip is fast, and prevents possible

src/m/a/matplotlib-HEAD/lib/matplotlib/colors.py   matplotlib(Download)
        if xa.dtype.char in np.typecodes['Float']:
            # Treat 1.0 as slightly less than 1.
            cbook._putmask(xa, xa==1.0, np.nextafter(xa.dtype.type(1),
                                                     xa.dtype.type(0)))
            # The following clip is fast, and prevents possible

src/t/a/tables-3.1.1/tables/idxutils.py   tables(Download)
        else:
            # return int(PyNextAfter(x, x - 1))
            return int(numpy.nextafter(x, x - 1))
    else:
        if isinstance(x, int):
            return x + 1
        else:
            # return int(PyNextAfter(x,x + 1)) + 1
            return int(numpy.nextafter(x, x + 1)) + 1
    elif dtype.kind == "f":
        if direction < 0:
            return numpy.nextafter(x, x - 1)
        else:
            return numpy.nextafter(x, x + 1)

src/p/y/PyTables-HEAD/tables/idxutils.py   PyTables(Download)
        else:
            # return int(PyNextAfter(x, x - 1))
            return int(numpy.nextafter(x, x - 1))
    else:
        if isinstance(x, int):
            return x + 1
        else:
            # return int(PyNextAfter(x,x + 1)) + 1
            return int(numpy.nextafter(x, x + 1)) + 1
    elif dtype.kind == "f":
        if direction < 0:
            return numpy.nextafter(x, x - 1)
        else:
            return numpy.nextafter(x, x + 1)

src/i/n/inasafe-HEAD/safe_qgis/utilities/styling.py   inasafe(Download)
            # skip it as it does not represent a class increment
            continue
        last_max = numpy.nextafter(quantity, sys.float_info.max)
        new_styles.append(style_class)
    return new_styles

src/g/d/gdal2mbtiles-1.1.0/gdal2mbtiles/gdal.py   gdal2mbtiles(Download)
            if value == numpy.finfo(datatype).max:
                return numpy.inf
            return numpy.nextafter(datatype(value), datatype(numpy.inf))
 
        else:

src/m/a/matplotlib-1.3.1/lib/matplotlib/colors.py   matplotlib(Download)
            # Treat 1.0 as slightly less than 1.
            vals = np.array([1, 0], dtype=xa.dtype)
            almost_one = np.nextafter(*vals)
            cbook._putmask(xa, xa == 1.0, almost_one)
            # The following clip is fast, and prevents possible

src/n/u/nupic-linux64-HEAD/lib64/python2.6/site-packages/numpy/core/tests/test_half.py   nupic-linux64(Download)
        assert_equal(np.spacing(a_f16[:-1]), a_f16[1:]-a_f16[:-1])
 
        assert_equal(np.nextafter(a_f16[:-1], hinf), a_f16[1:])
        assert_equal(np.nextafter(a_f16[0], -hinf), -a_f16[1])
        assert_equal(np.nextafter(a_f16[1:], -hinf), a_f16[:-1])
        assert_equal(np.spacing(a_f16[1:]), a_f16[:-1]-a_f16[1:])
 
        assert_equal(np.nextafter(a_f16[0], hinf), -a_f16[1])
        assert_equal(np.nextafter(a_f16[1:], hinf), a_f16[:-1])
        assert_equal(np.nextafter(a_f16[:-1], -hinf), a_f16[1:])

src/n/u/numpy-1.8.1/numpy/core/tests/test_half.py   numpy(Download)
        assert_equal(np.spacing(a_f16[:-1]), a_f16[1:]-a_f16[:-1])
 
        assert_equal(np.nextafter(a_f16[:-1], hinf), a_f16[1:])
        assert_equal(np.nextafter(a_f16[0], -hinf), -a_f16[1])
        assert_equal(np.nextafter(a_f16[1:], -hinf), a_f16[:-1])
        assert_equal(np.spacing(a_f16[1:]), a_f16[:-1]-a_f16[1:])
 
        assert_equal(np.nextafter(a_f16[0], hinf), -a_f16[1])
        assert_equal(np.nextafter(a_f16[1:], hinf), a_f16[:-1])
        assert_equal(np.nextafter(a_f16[:-1], -hinf), a_f16[1:])

src/n/u/numpy-1.8.1/numpy/core/tests/test_umath.py   numpy(Download)
    zero = t(0)
    eps = np.finfo(t).eps
    assert_(np.nextafter(one, two) - one == eps)
    assert_(np.nextafter(one, zero) - one < 0)
    assert_(np.isnan(np.nextafter(np.nan, one)))
    assert_(np.isnan(np.nextafter(one, np.nan)))
    assert_(np.nextafter(one, one) == one)

  1 | 2  Next