Skip to content

Commit 07feaf6

Browse files
Fixing pre-commit, jax test failing
1 parent 64de50e commit 07feaf6

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

pymc/distributions/continuous.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3689,13 +3689,8 @@ def dist(cls, x_points, pdf_points, *args, **kwargs):
36893689
def get_moment(rv, size, x_points, pdf_points, cdf_points):
36903690
# cdf_points argument is unused
36913691
# moment = at.as_tensor(0.)
3692-
print(x_points)
3693-
print("")
3694-
for pdf in pdf_points.eval():
3695-
print(pdf)
3696-
print("")
36973692
moment = at.sum(at.mul(x_points, pdf_points))
3698-
print(moment.eval())
3693+
36993694
if not rv_size_is_none(size):
37003695
moment = at.full(size, moment)
37013696

pymc/initial_point.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,6 @@ def make_initial_point_expression(
272272
if isinstance(strategy, str):
273273
if strategy == "moment":
274274
value = get_moment(variable)
275-
print(value.eval())
276275
elif strategy == "prior":
277276
value = variable
278277
else:

pymc/tests/test_distributions_moments.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -805,8 +805,18 @@ def test_categorical_moment(p, size, expected):
805805
"x_points, pdf_points, size, expected",
806806
[
807807
(np.array([-1, 1]), np.array([0.4, 0.6]), None, 0.2),
808-
(np.array([-4, -1, 3, 9, 19]), np.array([0.1 , 0.15, 0.2 , 0.25, 0.3]), None, 1.5458937198067635),
809-
(np.array([-22, -4, 0, 8, 13]), np.tile(1 / 5, 5), (5, 3), np.full((5, 3), -0.14285714285714296)),
808+
(
809+
np.array([-4, -1, 3, 9, 19]),
810+
np.array([0.1, 0.15, 0.2, 0.25, 0.3]),
811+
None,
812+
1.5458937198067635,
813+
),
814+
(
815+
np.array([-22, -4, 0, 8, 13]),
816+
np.tile(1 / 5, 5),
817+
(5, 3),
818+
np.full((5, 3), -0.14285714285714296),
819+
),
810820
(
811821
np.arange(-100, 10),
812822
np.arange(1, 111) / 6105,

0 commit comments

Comments
 (0)