Skip to content

Commit af24b27

Browse files
committed
bump version, make it compatible with numpy 2 and change to pyproject
1 parent 2f86026 commit af24b27

File tree

5 files changed

+49
-71
lines changed

5 files changed

+49
-71
lines changed

examples/example_pineappl.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def hadronic_pspgen(xarr, mmin, mmax):
6161
x2 = tau / y
6262
s = tau * smax
6363

64-
jacobian = np.math.log(tau0) * np.math.log(tau0) * tau * r1
64+
jacobian = np.log(tau0) * np.log(tau0) * tau * r1
6565

6666
# theta integration (in the CMS)
6767
cos_theta = 2.0 * r3 - 1.0
@@ -71,7 +71,7 @@ def hadronic_pspgen(xarr, mmin, mmax):
7171
u = -0.5 * s * (1.0 + cos_theta)
7272

7373
# phi integration
74-
jacobian *= 2.0 * np.math.acos(-1.0)
74+
jacobian *= 2.0 * np.acos(-1.0)
7575

7676
return s, t, u, x1, x2, jacobian
7777

pyproject.toml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
[build-system]
2+
requires = ["setuptools >= 61.0"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "vegasflow"
7+
version = "1.4.0"
8+
description="Hardware agnostic Monte Carlo integration"
9+
authors = [
10+
{name = "S. Carrazza", email = "stefano.carraza@cern.ch"},
11+
{name = "J.Cruz-Martinez", email = "juacrumar@lairen.eu"}
12+
]
13+
classifiers=[
14+
'Operating System :: Unix',
15+
'Programming Language :: Python',
16+
'Programming Language :: Python :: 3',
17+
'Topic :: Scientific/Engineering',
18+
'Topic :: Scientific/Engineering :: Physics',
19+
]
20+
dependencies = [
21+
"joblib",
22+
"numpy",
23+
"tensorflow>2.2"
24+
]
25+
26+
[project.optional-dependencies]
27+
docs = [
28+
'sphinx_rtd_theme',
29+
'recommonmark',
30+
'sphinxcontrib-bibtex',
31+
]
32+
examples = [
33+
'cffi',
34+
'pineappl',
35+
'pdfflow',
36+
'scipy'
37+
]
38+
benchmark = [
39+
'vegas', # Lepage's Vegas for benchmarking
40+
]
41+
distribute = [
42+
'dask',
43+
'distributed',
44+
'dask-jobqueue',
45+
]

setup.py

Lines changed: 0 additions & 67 deletions
This file was deleted.

src/vegasflow/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
from vegasflow.plain import PlainFlow, plain_wrapper, plain_sampler
88
from vegasflow.vflowplus import VegasFlowPlus, vegasflowplus_wrapper, vegasflowplus_sampler
99

10-
__version__ = "1.3.0"
10+
__version__ = "1.4.0"

src/vegasflow/monte_carlo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ def batch_events(**kwargs):
606606
)
607607
test_array = tf.random.uniform((event_size, self.n_dim), dtype=DTYPE)
608608
wgt = tf.random.uniform((event_size,), dtype=DTYPE)
609-
res_tmp = new_integrand(test_array, weight=wgt).numpy()
609+
res_tmp = new_integrand(test_array, weight=wgt)#.numpy()
610610
res_shape = res_tmp.shape
611611

612612
expected_shape = (event_size,)

0 commit comments

Comments
 (0)