# ROOT::Math::Functor in PyROOT (Multivariate minimization)

**URL:** <https://root-forum.cern.ch/t/root-functor-in-pyroot-multivariate-minimization/48260>\
**Category:** Newbie\
**Tags:** python\
**Created:** [January 4, 2022, 2:18pm UTC](https://root-forum.cern.ch/t/root-functor-in-pyroot-multivariate-minimization/48260 "2022-01-04T14:18:17Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![moneta](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/moneta/32/19423_2.png) [@moneta](https://root-forum.cern.ch/u/moneta)\
**Post date:** [January 5, 2022, 2:15pm UTC](https://root-forum.cern.ch/t/root-functor-in-pyroot-multivariate-minimization/48260/6 "2022-01-05T14:15:22Z")

</div>

Hi,

The function to pass to the minimizer must be a function requiring only one argument, but this can be a list or an array of several variables. These variables are the minimization parameters. In your case it is not clear to me what are these variables between x,p1,p3,p3,p4.  
Adding the constraints is another story, we do not support an interface for including them directly in the minimiser, you need to implement yourself as was already answered to you in  
[Minimization subject to constrains with Tminuit, is it possible? [PyROOT] - #4 by couet](https://root-forum.cern.ch/t/minimization-subject-to-constrains-with-tminuit-is-it-possible-pyroot/48027/4).

Here is the link to the example of doing the minimization in Python:  
[https://cernbox.cern.ch/index.php/s/A4JDlIuO35lm64k](https://cernbox.cern.ch/index.php/s/A4JDlIuO35lm64k)

Cheers

Lorenzo

---

_[View the full topic](https://root-forum.cern.ch/t/root-functor-in-pyroot-multivariate-minimization/48260)._
