def test_gammaincc_nan_c(): x1 = at.dscalar() x2 = at.dscalar() y = gammaincc(x1, x2) test_func = CLinker().accept(FunctionGraph([x1, x2], [y])).make_function() assert np.isnan(test_func(-1, 1)) assert np.isnan(test_func(1, -1)) assert np.isnan(test_func(-1, -1))
def test_gammaincc_python(): x1 = at.dscalar() x2 = at.dscalar() y = gammaincc(x1, x2) test_func = function([x1, x2], y, mode=Mode("py")) assert np.isclose(test_func(1, 2), sp.gammaincc(1, 2))