It might be a different kind of InexactError then. Try adding a @show on the rhs value, see what type it is. The array might need to be constructed in a way that it's capable of holding dual number element types.
On Mon, Nov 2, 2015 at 3:18 PM -0800, <[email protected]> wrote: Hi Tony: Thanks, but remember you asked. Your first request is answered by const dsts = 2 # dim( state vector ) which is set in the main file that calls to PF_RE_AR1_outer_alt.jl In PF_RE_AR1_outer_alt.jl, I set cs00V = eye(dsts) cs00V[2,2] = sigu*sigu/(1.0 - rho1*rho1) # this is the line at which Julia responds with ERROR: LoadError: InexactError() Note that sigu and rho1 are Float64 types. If you want, I can send you the complete set of Julia files/functions generating the problem in ForwardDiff.hessian. Best, Jim On Monday, November 2, 2015 at 10:31:08 AM UTC-5, Tony Kelman wrote: > > Misread the part where you said dsts = 2. Can you post more of the code, > exactly how is dsts getting passed to these lines? > > > On Monday, November 2, 2015 at 7:28:56 AM UTC-8, Tony Kelman wrote: >> >> By "the destination array" I meant the line >> >> cs00V = eye(dsts) >> >> If dsts is an integer element type there, then cs00V will also have an >> integer element type. Try eye(size(dsts)...) >> >> >> On Monday, November 2, 2015 at 5:32:54 AM UTC-8, [email protected] >> wrote: >>> >>> Hi Tony: >>> >>> Thanks for the suggestion. >>> >>> Unfortunately, the result is the same. >>> >>> I initialized/pre-allocated the destination array for the Hessian as >>> >>> hessh = zeros(nparm,nparm) >>> >>> Julia's reply from the call to >>> >>> hessh = ForwardDiff.hessian(PF_RE_AR1_outer_alt, parms) >>> >>> began with >>> >>> >>> ForwardDiff.HessianNumber{7,Float64,Tuple{Float64,Float64,Float64,Float64,Float64,Float64,Float64}} >>> >>> ForwardDiff.HessianNumber{7,Float64,Tuple{Float64,Float64,Float64,Float64,Float64,Float64,Float64}} >>> >>> followed by the ERROR: LoadError: InexactError() statement. >>> >>> Jim >>> >>> >>> On Sunday, November 1, 2015 at 11:35:16 PM UTC-5, Tony Kelman wrote: >>>> >>>> You probably need to initialize the destination array with a floating >>>> point, rather than integer, element type. >>> >>>
