[julia-users] Re: Strange behaviour on type dependency of function
And there was the error! SOLVED! The problem was the keyword argument bIN::Array{Int64, 2} = zeros(1,1) , which should have been bIN::Array{Int64, 2} = zeros(Int, 1,1) Best, Michael Den tirsdag den 5. januar 2016 kl. 10.33.32 UTC+1 skrev Michael Borregaard: > > I think maybe the issue is in the definition of the keyword arguments - > the full function definition starts thus: > function MarginsRnd(SampN::Int64, rN::Vector{Int64}, cN::Vector{Int64}; wN > ::Array{Float64, 2} = zeros(1,1), pflag::ASCIIString = "canfield", wflag:: > ASCIIString = "sinkhorn", cflag::ASCIIString = "descend", bIN::Array{Int64 > , 2} = zeros(1,1), doA = true) > > > > > Den tirsdag den 5. januar 2016 kl. 09.59.35 UTC+1 skrev Michael Borregaard: >> >> The problem is - I never call __MarginsRnd#2__ ! I have no idea where >> that list of arguments may be coming from. I am sorry, but I do not even >> understand why I get an automatically created __MarginsRnd#2__ method when >> the MarginsRnd function only has 1 method? >> >
[julia-users] Re: Strange behaviour on type dependency of function
The problem is - I never call __MarginsRnd#2__ ! I have no idea where that list of arguments may be coming from. I am sorry, but I do not even understand why I get an automatically created __MarginsRnd#2__ method when the MarginsRnd function only has 1 method?
[julia-users] Re: Strange behaviour on type dependency of function
I think maybe the issue is in the definition of the keyword arguments - the full function definition starts thus: function MarginsRnd(SampN::Int64, rN::Vector{Int64}, cN::Vector{Int64}; wN:: Array{Float64, 2} = zeros(1,1), pflag::ASCIIString = "canfield", wflag:: ASCIIString = "sinkhorn", cflag::ASCIIString = "descend", bIN::Array{Int64, 2} = zeros(1,1), doA = true) Den tirsdag den 5. januar 2016 kl. 09.59.35 UTC+1 skrev Michael Borregaard: > > The problem is - I never call __MarginsRnd#2__ ! I have no idea where that > list of arguments may be coming from. I am sorry, but I do not even > understand why I get an automatically created __MarginsRnd#2__ method when > the MarginsRnd function only has 1 method? >
Re: [julia-users] Re: Strange behaviour on type dependency of function
Thanks, I will edit it to Int64. On Tue, Jan 5, 2016 at 12:50 PM, Lutfullah Tomakwrote: > Good you sorted out that. One thing to keep in mind, if anyone tries to > use it on 32bit machine zeros(Int,1,1) will give an error.
[julia-users] Re: Strange behaviour on type dependency of function
Good you sorted out that. One thing to keep in mind, if anyone tries to use it on 32bit machine zeros(Int,1,1) will give an error.
Re: [julia-users] Re: Strange behaviour on type dependency of function
A other question is if those arrays really need to be Int64. Are you planning on using properties of Int64 that fail on Int32? Else just go with Int.
Re: [julia-users] Re: Strange behaviour on type dependency of function
OK, thanks On Tue, Jan 5, 2016 at 1:21 PM, Kristoffer Carlssonwrote: > A other question is if those arrays really need to be Int64. Are you > planning on using properties of Int64 that fail on Int32? Else just go with > Int.