Skip to content

Commit

Permalink
Use comprehension instead of map
Browse files Browse the repository at this point in the history
  • Loading branch information
Armavica committed Oct 8, 2024
1 parent 35dd87a commit 63210f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pymc/distributions/dist_math.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def log_normal(x, mean, **kwargs):
rho = kwargs.get("rho")
tau = kwargs.get("tau")
eps = kwargs.get("eps", 0.0)
check = sum(map(lambda a: a is not None, [sigma, w, rho, tau]))
check = sum(a is not None for a in [sigma, w, rho, tau])
if check > 1:
raise ValueError("more than one required kwarg is passed")
if check == 0:
Expand Down

0 comments on commit 63210f5

Please sign in to comment.