Skip to content

n-dimensional integration using bayesquad #513

@mmahsereci

Description

@mmahsereci

Discussed in #512

Originally posted by gerdm August 8, 2021
Hi,

I've been trying to use probnum's bayesquad function to integrate a vector-valued function. However, I cannot get it to work. Here's a small example

from probnum.quad import bayesquad

def f(x):
    return x.T @ x

domain=jnp.array([-3, 3])
bayesquad(f, 2, domain=domain)

but I get the following error

ValueError: matmul: Input operand 1 has a mismatch in its core dimension 0, with gufunc signature (n?,k),(k,m?)->(n?,m?) (size 2 is different from 50)

I've tried different different domain configurations, but they do not work either.

domain = np.array([
[-3, 3],
[-3, 3]
])

domain = np.array([-3, 3, -3, 3])

How can I compute this integral?

Metadata

Metadata

Assignees

Labels

quadIssues related to quadrature

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions