# Distribution in 1.4.2?

**URL:** <https://discourse.julialang.org/t/distribution-in-1-4-2/41113>\
**Category:** Statistics\
**Tags:** package\
**Created:** [June 10, 2020, 7:45am UTC](https://discourse.julialang.org/t/distribution-in-1-4-2/41113 "2020-06-10T07:45:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![janrpeters](https://avatars.discourse-cdn.com/v4/letter/j/d26b3c/32.png) [@janrpeters](https://discourse.julialang.org/u/janrpeters)\
**Post date:** [June 10, 2020, 7:45am UTC](https://discourse.julialang.org/t/distribution-in-1-4-2/41113/1 "2020-06-10T07:45:00Z")

</div>

I am converting a lot between distributions. In Julia 1.2 , this code worked perfectly:

```julia
Logistic(p::Logistic) = p;
Normal(p::Normal) = p;
Gumbel(p::Gumbel) = p;

Logistic(p::Gumbel) = (ξ=0.68; Logistic(p.μ-p.θ*log(log(2)),p.θ*ξ)); 
Gumbel(p::Logistic) = (ξ=0.68; Gumbel(p.μ+p.θ*log(log(2))/ξ,p.θ/ξ)); 

Normal(p::Logistic) = (ξ=1/1.6; Normal(p.μ,p.θ/ξ)); #
Logistic(p::Normal) = (ξ=1/1.6; Logistic(p.μ,p.σ*ξ)); 

Normal(p::Gumbel) = (ξ=1; Normal(p.μ-p.θ*log(log(2))/ξ,p.θ*ξ)); 
Gumbel(p::Normal) = (ξ=1; Gumbel(p.μ+p.σ*log(log(2))/ξ,p.σ/ξ));

```

Suddenly, in Julia 1.4.2, it is broken. I get the error

`ArgumentError: invalid type for argument p in method definition for Normal at In[10]:3`

Any help would be highly appreciated. It may generally be a good feature for univariate distributions…

---

<div class="post-metadata">

**Author:** ![contradict](https://avatars.discourse-cdn.com/v4/letter/c/ac91a4/32.png) [@contradict](https://discourse.julialang.org/u/contradict)\
**Post date:** [June 10, 2020, 5:54pm UTC](https://discourse.julialang.org/t/distribution-in-1-4-2/41113/2 "2020-06-10T17:54:45Z")

</div>

This code works fine for me in the Julia 1.4.2 REPL after `using Distributions`. How did you run it when you got the error?

---

<div class="post-metadata">

**Author:** ![janrpeters](https://avatars.discourse-cdn.com/v4/letter/j/d26b3c/32.png) [@janrpeters](https://discourse.julialang.org/u/janrpeters)\
**Post date:** [June 11, 2020, 1:11pm UTC](https://discourse.julialang.org/t/distribution-in-1-4-2/41113/3 "2020-06-11T13:11:34Z")

</div>

> This code works fine for me in the Julia 1.4.2 REPL after `using Distributions`. How did you run it when you got the error?

When I run it once on a clean memory, it works. If I run it again, it  
does not. But I learned  
an easy fix:

using Distributions  
import Distributions.Logistic  
import Distributions.Normal  
import Distributions.Gumbel
