Inexact error with rand function

Define

Base.eltype(::Type{ComplexNormal}) = ComplexF64

so that Julia knows that the output type is ComplexF64 rather than Float64 (which is the default for continuous distributions).

See also this discussion: What problems will one have, if `Real` was made a subtype of `Complex`?

1 Like