User-defined objective function with scalar and vector inputs

The element type of this vector is Float64. See ForwardDiff cannot assign ForwardDiff.Dual to input array.