Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify integration limits #82

Merged
merged 5 commits into from Jul 9, 2022
Merged

Specify integration limits #82

merged 5 commits into from Jul 9, 2022

Conversation

scarlehoff
Copy link
Member

This fixes #80

In order to use it the xmin and xmax keywords need to be used when instantiating the algorithm

from vegasflow import VegasFlow
import tensorflow as tf

def simple_integrand(xarr):
    return tf.reduce_prod(xarr, axis=1)

dims = 2
ncalls = int(1e4)
xmin = [0, 1]
xmax = [1.0, 4.0]
inst = VegasFlow(dims, ncalls, xmin=xmin, xmax=xmax)
inst.compile(simple_integrand)
result = inst.run_integration(5)

I need to give it a bit of testing to make sure that it works as it should but it should serve your use case @Mulliken

@NominHanggai
Copy link

Thanks for making this change @scarlehoff!

@scarlehoff scarlehoff merged commit 1f58a19 into master Jul 9, 2022
@scarlehoff scarlehoff deleted the modify_integration_limits branch July 9, 2022 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Specifying integration limits
2 participants