Dear all,
There is something I did not understood well in Julia regarding the type fo
the variables and this creates difficulties with the functions I am writing.
For one of the functions of Spectra.jl package, I wrote for instance:
function gaussianarea(Amplitude::Array{Float64},HWHM::Array{Float64};
eseAmplitude::Array{Float64} = 0, eseHWHM::Array{Float64} = 0)
I was thinking that using the ::Array{Float64} will allow users to enter
either vectors or arrays. However, when I try to enter a vectors for
Amplitude or HWHM for instance, I get the following error:
LoadError: MethodError: `gaussianarea` has no method matching
gaussianarea(::Array{Float64,1}, ::Array{Float64,1}, ::Array{Float64,1},
::Array{Float64,1})
Closest candidates are:
gaussianarea(::Array{Float64,N}, ::Array{Float64,N})
while loading In[46], in expression starting on line 9
I'm quite disappointed by that and don't know how to avoid it... Because
for me a vector is an Array {Float64,1}... But the above message says no?
What did I miss here?