I added “climatesensitivity = EmpiricalDistribution(LC18ECS,LC18PD)” to my defmcs.jl file in my Notebook.
As it requires a definition of EmpiricalDistribution I added the EmpiricalDistribution.jl file to my Noterbook. Running this file gives message “cannot assign a value to variable Mimi.EmpiricalDistribution from module Main”.
How can I fix this error?
I don’t think running the file should try to assign a value to the distribution, and I don’t know what “module Main” is. What is it?
Most of the file is just defining functions, including “function EmpiricalDistribution”, but the top of the file also has:
struct EmpiricalDistribution{T} <: PseudoDistribution
values::Vector{T}
weights::ProbabilityWeights
dist::Distribution
What does this code do? Do I need it and do I need to modify it?
I tried commenting out this code and its ‘end’ with #, then run it, which runs without giving any message. Then I ran my modified defmcs.jl file which gave message "MethodError: no method matching EmpiricalDistribution(::NTuple{63,Float64}, ::NTuple{63,Float64})
I appreciate your help!