I was wondering if there is a way to write a function with python that, automatically, propagate the uncertainties from n variables x_1,...,x_n to a function of these variables f=f(x_1,...,x_n,a_1,.., a_m), where a_1,..., a_m are parameters of f. Like, this function should get in input f, the variables x_1,..,x_n (possibly, each of these x_i are arrays with P elements) and their uncertainties sigma_x1,...,sigma_xn; then, it should give us an array f_value (where f_value[j] = f(x_1[j],...,x_n[j],a_1,.., a_m)) and its uncertainties sigma_f (computed with the covariance terms). Is this possible? I study physics and the propagation of uncertainty is something that i do a lot, and having a python function that can do this automatically will be very helpful. Sorry for my bad english, it's not my native language.
I tried using libraries like the uncertainties package, sympy or the monte carlo method, but none of that worked.