This is another computation that would benefit from a DoubleVectorView in case kappa is size 1 and other args are bigger.