`dense_output` should be the last argument to be backward compatible.