Skip to content

Commit bc0ec61

Browse files
ricardoV94twiecki
authored andcommitted
Remove unnecessary at.squeeze in logp and logcdf of Mixtures
1 parent d60b4cf commit bc0ec61

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

pymc/distributions/mixture.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -388,12 +388,6 @@ def marginal_mixture_logprob(op, values, rng, weights, *components, **kwargs):
388388

389389
mix_logp = at.logsumexp(at.log(weights) + components_logp, axis=-1)
390390

391-
# Squeeze stack dimension
392-
# There is a Aesara bug in squeeze with negative axis
393-
# https://github.com/aesara-devs/aesara/issues/830
394-
# mix_logp = at.squeeze(mix_logp, axis=-1)
395-
mix_logp = at.squeeze(mix_logp, axis=mix_logp.ndim - 1)
396-
397391
mix_logp = check_parameters(
398392
mix_logp,
399393
0 <= weights,
@@ -421,12 +415,6 @@ def marginal_mixture_logcdf(op, value, rng, weights, *components, **kwargs):
421415

422416
mix_logcdf = at.logsumexp(at.log(weights) + components_logcdf, axis=-1)
423417

424-
# Squeeze stack dimension
425-
# There is a Aesara bug in squeeze with negative axis
426-
# https://github.com/aesara-devs/aesara/issues/830
427-
# mix_logp = at.squeeze(mix_logp, axis=-1)
428-
mix_logcdf = at.squeeze(mix_logcdf, axis=mix_logcdf.ndim - 1)
429-
430418
mix_logcdf = check_parameters(
431419
mix_logcdf,
432420
0 <= weights,

0 commit comments

Comments
 (0)