Skip to content

Commit f2923d6

Browse files
committed
Fix tests that clashed with new numpy printing
1 parent 74bb5d9 commit f2923d6

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

.coverage

340 KB
Binary file not shown.

docs/source/gpds.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ This is now a complete object and CFFs can be evaluated for some kinematics:
171171
.. code-block:: python
172172
173173
>>> cff.ReH(g.DataPoint(xB=0.1, t=-0.3, Q2=6))
174-
13.44851
174+
np.float64(13.448510742222517)
175175
176176
177177
TFFs

docs/source/quickstart.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ User can also calculate other observables, like beam charge asymmetry
9393
.. code-block:: python
9494
9595
>>> th_KM15.AC(pt)
96-
0.138049
96+
np.float64(0.1380493081710745)
9797
9898
All implemented observables are listed :ref:`here<tab-observables>`.
9999

@@ -104,7 +104,7 @@ example :math:`\mathfrak{Im}\mathcal{H}`
104104
.. code-block:: python
105105
106106
>>> th_KM15.ImH(pt)
107-
2.80754427
107+
np.float64(2.807544271408012)
108108
109109
110110
.. note::
@@ -119,6 +119,6 @@ example :math:`\mathfrak{Im}\mathcal{H}`
119119

120120
>>> pt = g.DataPoint(xB=0.348, t=-0.3, Q2=3)
121121
>>> th_KM15.ImH(pt) # This will work
122-
2.8075
122+
np.float64(2.807544271408012)
123123

124124

src/gepard/qcd.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ def beta(p: int, nf: int) -> float:
5151
beta = - B00 - B01 * nf
5252
elif p == 1:
5353
beta = - B10 - B11 * nf
54-
elif p == 2:
55-
beta = - 1428.50 + 279.611 * nf - 6.01852 * nf**2
56-
elif p == 3:
57-
beta = - 29243.0 + 6946.30 * nf - 405.089 * nf**2 - 1.49931 * nf**3
54+
# elif p == 2:
55+
# beta = - 1428.50 + 279.611 * nf - 6.01852 * nf**2
56+
# elif p == 3:
57+
# beta = - 29243.0 + 6946.30 * nf - 405.089 * nf**2 - 1.49931 * nf**3
5858
else:
59-
raise ValueError('NNNNLO not yet implemented :-)')
59+
raise ValueError('Only LO and NLO implemented!')
6060

6161
return beta
6262

src/gepard/quadrature.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from typing import Tuple
77

88
import numpy as np
9-
from scipy.special.orthogonal import p_roots
9+
from scipy.special import p_roots
1010

1111
roots4, weights4 = p_roots(4) # roots and weigths for 4-th order quadrature
1212

src/gepard/theory.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,9 @@ def predict(self, pt: data.DataPoint, uncertainty: bool = False, **kwargs) -> fl
144144
var += (dfdp[p]*self.parameters_errors[p])**2
145145
else:
146146
print('Theory has neither covariance matrix, nor parameters_errors.')
147-
result = (fun(pt), sqrt(var))
147+
result = (float(fun(pt)), float(sqrt(var)))
148148
else:
149-
result = fun(pt)
149+
result = float(fun(pt))
150150

151151
if 'parameters' in kwargs:
152152
# restore old values

0 commit comments

Comments
 (0)