File tree Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -119,11 +119,6 @@ class ScipyMinimizer : public BasicMinimizer {
119119 void SetAlgoExtraOptions ();
120120
121121public:
122- // / set the function to minimize
123- // virtual void SetFunction(const ROOT::Math::IMultiGenFunction &func);
124-
125- // / set the function to minimize
126- // virtual void SetFunction(const ROOT::Math::IMultiGradFunction &func) { BasicMinimizer::SetFunction(func); }
127122
128123 // / method to perform the minimization
129124 virtual bool Minimize () override ;
Original file line number Diff line number Diff line change @@ -73,10 +73,6 @@ ScipyMinimizer::ScipyMinimizer(const char *type)
7373void ScipyMinimizer::SetAlgoExtraOptions ()
7474{
7575 std::string type = fOptions .MinimizerAlgorithm ();
76- if (type == " L-BFGS-B" ) {
77- fExtraOpts .SetValue (" gtol" , 1e-8 );
78- fExtraOpts .SetValue (" eps" , 0.01 );
79- }
8076 SetExtraOptions (fExtraOpts );
8177}
8278
@@ -197,6 +193,11 @@ bool ScipyMinimizer::Minimize()
197193
198194 // PyPrint(kw);
199195 PyObject *result = PyObject_Call (fMinimize , args, kw);
196+ if (result == NULL )
197+ {
198+ PyErr_Print ();
199+ return false ;
200+ }
200201 // PyPrint(result);
201202 Py_DECREF (args);
202203 Py_DECREF (kw);
You can’t perform that action at this time.
0 commit comments