Thanks for the hint, I will have to look at bit closer at this. I can run my function, say phi(), on a vector, say P, and get the proper best response out. But when I try to use ForwardDiff.Jacobian, I get
ERROR: InexactError()
in setindex! at array.jl:313
in copy! at abstractarray.jl:307
in phi at none:29
in _calc_jacobian at /home/pkm/.julia/v0.4/ForwardDiff/src/api/jacobian.jl:101
in jacobian at /home/pkm/.julia/v0.4/ForwardDiff/src/api/jacobian.jl:27
This strikes me a kind of weird, since the original method works. Line 29 assigns a vector into a vector of vectors.