from __future__ import absolute_import

from .optimization import ParameterManager, minimize
from .jacobian import FunctionWithApproxJacobian, FunctionWithApproxJacobianCentral

from __future__ import absolute_import

from .optimization import ParameterManager, minimize
from .jacobian import FunctionWithApproxJacobian, FunctionWithApproxJacobianCentral

try:
    from .ipopt_wrapper import minimize_ipopt
except:
    import logging
    logging.error("Could not import ipopt wrapper. Maybe ipopt is not installed?")

Make sure package works even if ipopt is not installed
Make sure package works even if ipopt is not installed

Signed-off-by: Matthias Kümmerer <e388d34fd3c0456122779e95f262c0d70198a168@matthias-k.org>

  from __future__ import absolute_import
  
  from .optimization import ParameterManager, minimize
  from .jacobian import FunctionWithApproxJacobian, FunctionWithApproxJacobianCentral
  
+ try:
+     from .ipopt_wrapper import minimize_ipopt
+ except:
+     import logging
+     logging.error("Could not import ipopt wrapper. Maybe ipopt is not installed?")
+ 
Make sure package works even if ipopt is not installed
## Code Before:
from __future__ import absolute_import

from .optimization import ParameterManager, minimize
from .jacobian import FunctionWithApproxJacobian, FunctionWithApproxJacobianCentral

## Instruction:
Make sure package works even if ipopt is not installed
## Code After:
from __future__ import absolute_import

from .optimization import ParameterManager, minimize
from .jacobian import FunctionWithApproxJacobian, FunctionWithApproxJacobianCentral

try:
    from .ipopt_wrapper import minimize_ipopt
except:
    import logging
    logging.error("Could not import ipopt wrapper. Maybe ipopt is not installed?")
