Exemplo n.º 1
0
def test_call_1arg():
    def func(x, a, b, c, kw1=True, kw2=None):
        return 1.

    d = 10
    a = Integrand(func, d, 1, args=(2, 3, 'a'), kwargs={'kw1': 1, 'kw2': 2})
    a.call(np.zeros((2,), dtype=float))
Exemplo n.º 2
0
def test_vcall_1arg():
    def func(x, a, b, c, kw1=True, kw2=None):
        return np.ones((x.shape[0],))

    d = 10
    a = Integrand(func, d, 1, args=(2, 3, 'a'), kwargs={'kw1': 1, 'kw2': 2})
    a.vcall(np.zeros((100, d), dtype=float))
Exemplo n.º 3
0
def test_call_1arg():
    def func(x, a, b, c, kw1=True, kw2=None):
        return 1.

    d = 10
    a = Integrand(func, d, 1, args=(2, 3, 'a'), kwargs={'kw1': 1, 'kw2': 2})
    a.call(np.zeros((2, ), dtype=float))
Exemplo n.º 4
0
def test_vcall_1arg():
    def func(x, a, b, c, kw1=True, kw2=None):
        return np.ones((x.shape[0], ))

    d = 10
    a = Integrand(func, d, 1, args=(2, 3, 'a'), kwargs={'kw1': 1, 'kw2': 2})
    a.vcall(np.zeros((100, d), dtype=float))
Exemplo n.º 5
0
def test_vcall_narg():
    ndim = 1
    fdim = 10
    def func(x, a, b, c, kw1=True, kw2=None):
        return np.zeros((x.shape[0], fdim,))

    a = Integrand(func, ndim, fdim, args=(2, 3, 'a'), kwargs={'kw1': 1, 'kw2': 2})
    a.vcall(np.zeros((1000, 1,), dtype=float))
Exemplo n.º 6
0
def test_vcall_narg():
    ndim = 1
    fdim = 10
    def func(x, a, b, c, kw1=True, kw2=None):
        return np.zeros((x.shape[0], fdim,))

    a = Integrand(func, ndim, fdim, args=(2, 3, 'a'), kwargs={'kw1': 1, 'kw2': 2})
    a.vcall(np.zeros((1000, 1,), dtype=float))