tobiasraabe: @janos There is an issue documented starting in ``internal_func`` in differentiation. It is because for scaling I have to set up an internal criterion function and pass it to gradient. There it gets wrapped again.
janosg: Whether to take derivatives for standard errors on external or internal params was discussed extensively in #57 and we decided that for now we take the derivatives on on the external params. 

Our derivative functions should work for functions that take numpy arrays as well. If they currently don't we have to rewrite `_create_internal_func`. The double wrapping is not very nice but the speed penalty is probably negligible. 

For the scaling we should probably use faster but less precise derivatives. So `extrapolation=False` and maybe even `method="forward"`. We should also use a larger stepsize. This can currently not be specified but I'll change it in #59. 


tobiasraabe: @janosg I implemented the scaling like you suggested. The linting catches some unused arguments. You can go through the list or I can disable it.
janosg: @peisenha  I requested a review from you because you have implemented precondotioning for an optimizer before. 
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 39686e2..28af28e 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -34,13 +34,12 @@ repos:
     hooks:
     -   id: black
         types: [python]
+-   repo: https://github.com/PyCQA/doc8
+    rev: 0.8.1rc2
+    hooks:
+        -   id: doc8
 -   repo: local
     hooks:
-    -   id: doc8
-        entry: doc8
-        language: system
-        types: [rst]
-        name: doc8 - Lint the documentation.
     -   id: restructuredtext-lint
         entry: rst-lint
         language: system
diff --git a/docs/source/estimation.rst b/docs/source/estimation.rst
index abc3e08..f2f4e6b 100644
--- a/docs/source/estimation.rst
+++ b/docs/source/estimation.rst
@@ -184,3 +184,29 @@ The options can be found `here
 - scipy_L-BFGS-B
 - scipy_TNC
 - scipy_SLSQP
+
+
+.. _estimation_general_options:
+
+General options
+---------------
+
+You can pass a dictionary with general options to the
+:func:`~estimagic.optimization.optimize.minimize` or
+:func:`~estimagic.optimization.optimize.maximize` function. The following options are
+available.
+
+**Scaling of the parameter vector**
+
+``estimagic`` is able to automatically scale the parameter vector such that the
+optimizer receives parameters closer to 1. There are two available methods.
+
+1. ``{"scaling": "start_values"}`` divides the parameter vector by the starting
+   values for all starting values not in ``[-1, 1]``.
+
+2. ``{"scaling": "gradient"}`` divides the parameter vector by the inverse of the
+   gradient for each parameter not in ``[-1e-2, 1e-2]``. By default,
+   ``{"scaling_gradient_method": "central", "scaling_gradient_extrapolation": False}``
+   are also set. ``"forward"`` and ``"backward"`` can also be used as a method and
+   extrapolation can be turned on by setting the value to ``True``. Note that without
+   extrapolation, the gradient is computed faster.
diff --git a/docs/source/inference.rst b/docs/source/inference.rst
index 466d0e3..4e2be80 100644
--- a/docs/source/inference.rst
+++ b/docs/source/inference.rst
@@ -4,7 +4,8 @@ Inference
 
 Here we will have standard error functions for the following types of models:
 
-- maximum likelihood (ml) generalized method of moments (gmm) method of simulated moments
+- maximum likelihood (ml) generalized method of moments (gmm) method of simulated
+  moments
 - (msm) indirect inference (ii)
 
 Generalized Method of Moments (GMM)
@@ -17,10 +18,10 @@ the notation and formulations provided in section 13.25 of
 
 Bruce E. Hansen - Econometrics (https://www.ssc.wisc.edu/~bhansen/econometrics)
 
-The distribution of the estimator is shaped by the moment conditions, which are functions
-of the estimated parameter :math:`\beta` to the real numbers. We denote the vector of all
-moment condition values for observation :math:`i` by :math:`\textbf{g}_i`. With this on
-hand the calculation of the covariance matrix can be formalized:
+The distribution of the estimator is shaped by the moment conditions, which are
+functions of the estimated parameter :math:`\beta` to the real numbers. We denote the
+vector of all moment condition values for observation :math:`i` by :math:`\textbf{g}_i`.
+With this on hand the calculation of the covariance matrix can be formalized:
 
 .. math:: V = n^{-1}(Q^{T}WQ)^{-1} (Q^{T}W\Omega WQ) (Q^{T}WQ)^{-1}
 
diff --git a/docs/source/optimize.rst b/docs/source/optimize.rst
index e8cf061..bb1bd2d 100644
--- a/docs/source/optimize.rst
+++ b/docs/source/optimize.rst
@@ -2,7 +2,6 @@
 Optimization tools
 ==================
 
-
 .. _minimize:
 
 minimize function
@@ -25,5 +24,4 @@ Processing constraints
 Enforcing constraints by reparametrizations and bounds
 ------------------------------------------------------
 
-
 .. automodule:: estimagic.optimization.reparametrize
diff --git a/environment.yml b/environment.yml
index 266bba2..77da094 100644
--- a/environment.yml
+++ b/environment.yml
@@ -25,7 +25,6 @@ dependencies:
   - jupyter
   - fuzzywuzzy
   - pip:
-    - doc8
     - pre-commit
     - pytest
     - pytest-mock
diff --git a/estimagic/differentiation/differentiation.py b/estimagic/differentiation/differentiation.py
index f736f5d..5679cf8 100644
--- a/estimagic/differentiation/differentiation.py
+++ b/estimagic/differentiation/differentiation.py
@@ -174,6 +174,7 @@ def _create_internal_func(func, params, func_args, func_kwargs):
     def internal_func(x):
         p = params.copy(deep=True)
         p["value"] = x
+
         func_value = func(p, *func_args, **func_kwargs)
         if isinstance(func_value, (pd.DataFrame, pd.Series)):
             func_value = func_value.to_numpy()
diff --git a/estimagic/optimization/optimize.py b/estimagic/optimization/optimize.py
index 4fe942d..98dabd7 100644
--- a/estimagic/optimization/optimize.py
+++ b/estimagic/optimization/optimize.py
@@ -7,10 +7,12 @@ from multiprocessing import Queue
 from pathlib import Path
 
 import numpy as np
+import pandas as pd
 import pygmo as pg
 from scipy.optimize import minimize as scipy_minimize
 
 from estimagic.dashboard.server_functions import run_server
+from estimagic.differentiation.differentiation import gradient
 from estimagic.optimization.process_constraints import process_constraints
 from estimagic.optimization.reparametrize import reparametrize_from_internal
 from estimagic.optimization.reparametrize import reparametrize_to_internal
@@ -147,7 +149,17 @@ def minimize(
     params = _process_params(params)
     fitness_eval = criterion(params, *criterion_args, **criterion_kwargs)
     constraints = process_constraints(constraints, params)
-    internal_params = reparametrize_to_internal(params, constraints)
+    internal_params = reparametrize_to_internal(params, constraints, None)
+
+    scaling_factor = calculate_scaling_factor(
+        criterion,
+        params,
+        internal_params,
+        constraints,
+        general_options,
+        criterion_args,
+        criterion_kwargs,
+    )
 
     queue = Queue() if dashboard else None
     if dashboard:
@@ -172,6 +184,7 @@ def minimize(
         params=params,
         internal_params=internal_params,
         constraints=constraints,
+        scaling_factor=scaling_factor,
         algorithm=algorithm,
         algo_options=algo_options,
         general_options=general_options,
@@ -191,6 +204,7 @@ def _minimize(
     params,
     internal_params,
     constraints,
+    scaling_factor,
     algorithm,
     algo_options,
     general_options,
@@ -233,11 +247,12 @@ def _minimize(
             the updated parameter Series will be supplied later.
 
     """
-    internal_criterion = _create_internal_criterion(
+    internal_criterion = create_internal_criterion(
         criterion=criterion,
         params=params,
         internal_params=internal_params,
         constraints=constraints,
+        scaling_factor=scaling_factor,
         criterion_args=criterion_args,
         criterion_kwargs=criterion_kwargs,
         queue=queue,
@@ -263,10 +278,12 @@ def _minimize(
         algo = _create_algorithm(algo_name, algo_options, origin)
         pop = _create_population(prob, algo_options, internal_params)
         evolved = algo.evolve(pop)
-        result = _process_results(evolved, params, internal_params, constraints, origin)
+        result = _process_results(
+            evolved, params, internal_params, constraints, origin, scaling_factor
+        )
     elif origin == "scipy":
         bounds = _get_scipy_bounds(internal_params)
-        x0 = _x_from_params(params, constraints)
+        x0 = _x_from_params(params, constraints, scaling_factor)
         minimized = scipy_minimize(
             internal_criterion,
             x0,
@@ -275,7 +292,7 @@ def _minimize(
             options=algo_options,
         )
         result = _process_results(
-            minimized, params, internal_params, constraints, origin
+            minimized, params, internal_params, constraints, origin, scaling_factor
         )
     else:
         raise ValueError("Invalid algorithm requested.")
@@ -283,11 +300,12 @@ def _minimize(
     return result
 
 
-def _create_internal_criterion(
+def create_internal_criterion(
     criterion,
     params,
     internal_params,
     constraints,
+    scaling_factor,
     criterion_args,
     criterion_kwargs,
     queue,
@@ -295,7 +313,7 @@ def _create_internal_criterion(
     c = np.ones(1, dtype=int)
 
     def internal_criterion(x, counter=c):
-        p = _params_from_x(x, internal_params, constraints, params)
+        p = _params_from_x(x, internal_params, constraints, params, scaling_factor)
         fitness_eval = criterion(p, *criterion_args, **criterion_kwargs)
         if queue is not None:
             queue.put(QueueEntry(iteration=counter[0], params=p, fitness=fitness_eval))
@@ -305,15 +323,23 @@ def _create_internal_criterion(
     return internal_criterion
 
 
-def _params_from_x(x, internal_params, constraints, params):
+def _params_from_x(x, internal_params, constraints, params, scaling_factor):
     internal_params = internal_params.copy(deep=True)
-    internal_params["value"] = x
-    updated_params = reparametrize_from_internal(internal_params, constraints, params)
+    # :func:`internal_criterion` always assumes that `x` is a NumPy array, but if we
+    # pass the internal criterion function to :func:`gradient`, x is a DataFrame.
+    # Setting a series to a DataFrame will convert the column "value" to object type
+    # which causes trouble in following NumPy routines assuming a numeric type.
+    internal_params["value"] = x["value"] if isinstance(x, pd.DataFrame) else x
+    updated_params = reparametrize_from_internal(
+        internal_params, constraints, params, scaling_factor
+    )
     return updated_params
 
 
-def _x_from_params(params, constraints):
-    return reparametrize_to_internal(params, constraints)["value"].to_numpy()
+def _x_from_params(params, constraints, scaling_factor):
+    return reparametrize_to_internal(params, constraints, scaling_factor)[
+        "value"
+    ].to_numpy()
 
 
 def _process_params(params):
@@ -395,7 +421,7 @@ def _create_population(problem, algo_options, internal_params):
     return pop
 
 
-def _process_results(res, params, internal_params, constraints, origin):
+def _process_results(res, params, internal_params, constraints, origin, scaling_factor):
     """Convert optimization results into json serializable dictionary.
     Args:
         res: Result from numerical optimizer.
@@ -414,7 +440,85 @@ def _process_results(res, params, internal_params, constraints, origin):
     elif origin in ["pygmo", "nlopt"]:
         x = res.champion_x
         res_dict = {"fun": res.champion_f[0]}
-    params = _params_from_x(x, internal_params, constraints, params)
+    params = _params_from_x(x, internal_params, constraints, params, scaling_factor)
 
     res_dict["internal_x"] = x.tolist()
     return res_dict, params
+
+
+def calculate_scaling_factor(
+    criterion,
+    params,
+    internal,
+    constraints,
+    general_options,
+    criterion_args,
+    criterion_kwargs,
+):
+    """Calculate the scaling factor for the internal parameters.
+
+    There are multiple ways the user is able to rescale the parameter vector which is
+    specified in ``general_options["scaling"]``.
+
+    - ``None`` (default): No scaling happens.
+    - ``"start_values"``: Divide parameters which are not in ``[-1, 1]`` by their
+      starting values.
+    - ``"gradient"``: Divide parameters which are not in ``[-1e-2, 1e-2]`` by the
+      inverse of the gradient. By default, the computation method is ``"central"`` with
+      extrapolation set to ``False``. The user can change the defaults by passing
+      ``scaling_gradient_method`` or ``scaling_gradient_extrapolation``. See
+      :func:`~estimagic.differentiation.differentiation.gradient` for more details.
+
+    Note that the scaling factor should be defined such that unscaling is done by
+    multiplying the scaling factor. This simplifies :func:`_rescale_from_internal`.
+
+    Args:
+        criterion (func): Criterion function.
+        params (DataFrame): See :ref:`params`.
+        internal (DataFrame): See :ref:`params`.
+        constraints (dict): Dictionary containing constraints.
+        general_options (dict): General options. See :ref:`estimation_general_options`.
+        criterion_args (list): List of arguments of the criterion function.
+        crtierion_kwargs (dict): Dictionary of keyword arguments of the criterion
+            function.
+
+    Returns:
+        scaling_factor (Series): Scaling Factor.
+
+    """
+    scaling = general_options.get("scaling", None)
+
+    if scaling is None:
+        scaling_factor = np.ones(len(internal))
+    elif scaling == "start_values":
+        scaling_factor = internal["value"].abs().clip(1)
+    elif scaling == "gradient":
+        method = general_options.get("scaling_gradient_method", "central")
+        extrapolation = general_options.get("scaling_gradient_extrapolation", False)
+
+        internal_criterion = create_internal_criterion(
+            criterion,
+            params,
+            internal,
+            constraints,
+            None,
+            criterion_args,
+            criterion_kwargs,
+            queue=None,
+        )
+
+        gradients = gradient(
+            internal_criterion,
+            internal,
+            method,
+            extrapolation,
+            criterion_args,
+            criterion_kwargs,
+        )
+        scaling_factor = np.clip(1 / gradients.abs(), 1e-2, None)
+    else:
+        raise NotImplementedError(f"Scaling method {scaling} is not implemented.")
+
+    scaling_factor = pd.Series(scaling_factor, index=internal.index)
+
+    return scaling_factor
diff --git a/estimagic/optimization/reparametrize.py b/estimagic/optimization/reparametrize.py
index f005d78..9a33111 100644
--- a/estimagic/optimization/reparametrize.py
+++ b/estimagic/optimization/reparametrize.py
@@ -12,7 +12,7 @@ from estimagic.optimization.utilities import robust_cholesky
 from estimagic.optimization.utilities import sdcorr_params_to_matrix
 
 
-def reparametrize_to_internal(params, constraints):
+def reparametrize_to_internal(params, constraints, scaling_factor):
     """Convert a params DataFrame to an internal_params DataFrame.
 
     The internal params df is shorter because it does not contain fixed parameters.
@@ -61,6 +61,8 @@ def reparametrize_to_internal(params, constraints):
     internal = internal.loc[~(internal["_fixed"])].copy(deep=True)
     internal.drop(columns="_fixed", axis=1, inplace=True)
 
+    internal = _scaling_to_internal(internal, scaling_factor)
+
     invalid = internal.query("lower >= upper | lower > value | upper < value")
     assert (
         len(invalid) == 0
@@ -69,7 +71,9 @@ def reparametrize_to_internal(params, constraints):
     return internal
 
 
-def reparametrize_from_internal(internal_params, constraints, original_params):
+def reparametrize_from_internal(
+    internal_params, constraints, original_params, scaling_factor
+):
     """Convert an internal_params DataFrame to a Series with valid parameters.
 
     The parameter values are constructed from the 'value' column of internal_params.
@@ -87,7 +91,11 @@ def reparametrize_from_internal(internal_params, constraints, original_params):
 
     """
     external = original_params.copy(deep=True)
+
+    internal_params = _scaling_from_internal(internal_params, scaling_factor)
+
     external.update(internal_params["value"])
+
     external["_fixed"] = True
     external.loc[internal_params.index, "_fixed"] = False
 
@@ -420,3 +428,23 @@ def _fixed_from_internal(params_subset, constr):
     if value is not None:
         res["value"] = value
     return res["value"]
+
+
+def _scaling_to_internal(internal, scaling_factor):
+    """Scale parameters by division with the scaling factor."""
+    if scaling_factor is not None:
+        internal[["value", "lower", "upper"]] = internal[
+            ["value", "lower", "upper"]
+        ].divide(scaling_factor, axis="index")
+
+    return internal
+
+
+def _scaling_from_internal(internal, scaling_factor):
+    """Unscale parameters by multiplication with the scaling factor."""
+    if scaling_factor is not None:
+        internal[["value", "lower", "upper"]] = internal[
+            ["value", "lower", "upper"]
+        ].multiply(scaling_factor, axis="index")
+
+    return internal
diff --git a/setup.py b/setup.py
index 06d9410..52a2736 100644
--- a/setup.py
+++ b/setup.py
@@ -1,7 +1,7 @@
 from setuptools import find_packages
 from setuptools import setup
 
-version = "0.0.14"
+version = "0.0.15"
 
 setup(
     name="estimagic",
diff --git a/tox.ini b/tox.ini
index 69beb8d..d8a92bc 100644
--- a/tox.ini
+++ b/tox.ini
@@ -28,7 +28,6 @@ commands = pytest estimagic
 passenv = USERPROFILE SSH_AUTH_SOCK
 deps =
     pre-commit
-    doc8
     restructuredtext_lint
     Pygments
 commands =
@@ -70,3 +69,4 @@ norecursedirs =
 filterwarnings =
     ignore: Using or importing the ABCs from 'collections'
     ignore: the imp module is deprecated
+    ignore: indexing past lexsort depth may impact performance.

Add scaling of the parameter vector
Scale the parameter vector by the inverse of the start parameters in reparametrize_to_internal and undo the scaling in reparametrize_from_internal.
diff --git a/estimagic/tests/optimization/test_reparametrize.py b/estimagic/tests/optimization/test_reparametrize.py
index 35cb103..e4515d0 100644
--- a/estimagic/tests/optimization/test_reparametrize.py
+++ b/estimagic/tests/optimization/test_reparametrize.py
@@ -1,4 +1,3 @@
-import warnings
 from pathlib import Path
 
 import numpy as np
@@ -76,14 +75,11 @@ for ext, int_ in zip(external, internal):
 def test_reparametrize_to_internal(params, expected_internal, category):
     constr = constraints(params)
     cols = ["value", "lower", "upper"]
-    with warnings.catch_warnings():
-        warnings.filterwarnings(
-            "ignore", message="indexing past lexsort depth may impact performance."
-        )
-        calculated = reparametrize_to_internal(params, constr)
-        assert_frame_equal(
-            calculated.loc[category, cols], expected_internal.loc[category, cols]
-        )
+
+    calculated = reparametrize_to_internal(params, constr, None)
+    assert_frame_equal(
+        calculated.loc[category, cols], expected_internal.loc[category, cols]
+    )
 
 
 to_test = []
@@ -95,13 +91,8 @@ for int_, ext in zip(internal, external):
 @pytest.mark.parametrize("internal, expected_external, category", to_test)
 def test_reparametrize_from_internal(internal, expected_external, category):
     constr = constraints(expected_external)
-    with warnings.catch_warnings():
-        warnings.filterwarnings(
-            "ignore", message="indexing past lexsort depth may impact performance."
-        )
-        calculated = reparametrize_from_internal(internal, constr, expected_external)[
-            "value"
-        ]
-        assert_series_equal(
-            calculated[category], expected_external.loc[category, "value"]
-        )
+
+    calculated = reparametrize_from_internal(internal, constr, expected_external, None)[
+        "value"
+    ]
+    assert_series_equal(calculated[category], expected_external.loc[category, "value"])

environment.yml
pip install -e .
parse_log_pytest
environment.yml
pytest pytest-mock pytest-xdist
3.7
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
alabaster==0.7.12
algopy==0.6.1
anaconda-client==1.11.0
anyio==3.5.0
argon2-cffi==21.3.0
argon2-cffi-bindings==21.2.0
attrs==22.1.0
Babel==2.11.0
backcall==0.2.0
backports.functools-lru-cache==1.6.4
backports.tempfile==1.0
backports.weakref==1.0.post1
beautifulsoup4==4.11.1
black==23.3.0
bleach==4.1.0
bokeh==1.1.0
brotlipy==0.7.0
certifi==2022.12.7
cffi==1.15.1
cfgv==3.3.1
chardet==4.0.0
charset-normalizer==2.0.4
click==8.0.4
cloudpickle==2.0.0
clyent==1.2.2
colorama==0.4.6
conda==23.1.0
conda-build==3.23.3
conda-package-handling==2.0.2
conda-package-streaming==0.7.0
conda-verify==3.4.2
cryptography==39.0.1
cycler==0.11.0
debugpy==1.5.1
decorator==5.1.1
defusedxml==0.7.1
distlib==0.3.9
doc8==1.0.0
docutils==0.20.1
entrypoints==0.4
-e git+https://github.com/OpenSourceEconomics/estimagic.git@d4ff6a9704122b34cf5dc2b8faead97e0333dc11#egg=estimagic
exceptiongroup==1.2.2
execnet==2.0.2
fastjsonschema==2.16.2
filelock==3.12.2
flit-core==3.6.0
fonttools==4.25.0
future==0.18.3
fuzzywuzzy==0.18.0
glob2==0.7
identify==2.5.24
idna==3.4
imagesize==1.4.1
importlib-metadata==4.11.3
importlib-resources==5.2.0
iniconfig==2.0.0
ipykernel==6.15.2
ipyparallel==6.3.0
ipython==7.31.1
ipython-genutils==0.2.0
ipywidgets==7.6.5
jedi==0.18.1
Jinja2==3.1.2
json5==0.9.6
jsonschema==4.17.3
jupyter==1.0.0
jupyter-client==7.4.9
jupyter-console==6.4.4
jupyter-core==4.11.2
jupyter-server==1.23.4
jupyterlab==3.5.3
jupyterlab-pygments==0.1.2
jupyterlab-server==2.19.0
jupyterlab-widgets==1.0.0
kiwisolver==1.4.4
libarchive-c==5.1
lxml==4.9.1
MarkupSafe==2.1.1
matplotlib==3.4.3
matplotlib-inline==0.1.6
mistune==0.8.4
munkres==1.1.4
mypy-extensions==1.0.0
nbclassic==0.5.2
nbclient==0.5.13
nbconvert==6.5.4
nbformat==5.7.0
nbsphinx==0.9.7
nest-asyncio==1.5.6
nodeenv==1.9.1
notebook==6.5.2
notebook-shim==0.2.2
numdifftools==0.9.41
numpy==1.16.6
packaging==22.0
pandas==0.24.2
pandocfilters==1.5.0
parso==0.8.3
pathspec==0.11.2
patsy==0.5.3
pbr==6.1.1
pexpect==4.8.0
pickleshare==0.7.5
Pillow==9.4.0
pkginfo==1.8.3
pkgutil-resolve-name==1.3.10
platformdirs==4.0.0
pluggy==1.0.0
ply==3.11
pre-commit==2.21.0
prometheus-client==0.14.1
prompt-toolkit==3.0.43
psutil==5.9.0
ptyprocess==0.7.0
py==1.11.0
pycosat==0.6.4
pycparser==2.21
Pygments==2.11.2
pyOpenSSL==23.0.0
pyparsing==3.0.9
PyQt5-sip==12.11.0
pyrsistent==0.18.0
PySocks==1.7.1
pytest==7.4.4
pytest-mock==3.11.1
pytest-xdist==3.5.0
python-dateutil==2.8.2
python-Levenshtein==0.12.2
pytz==2022.7
PyYAML==6.0
pyzmq==23.2.0
qtconsole==5.4.0
QtPy==2.2.0
requests==2.28.1
restructuredtext-lint==1.4.0
ruamel.yaml==0.17.21
ruamel.yaml.clib==0.2.6
scipy==1.2.1
seaborn==0.11.2
Send2Trash==1.8.0
sip==6.6.2
six==1.16.0
sniffio==1.2.0
snowballstemmer==2.2.0
soupsieve==2.3.2.post1
Sphinx==5.0.2
sphinx-rtd-theme==0.4.3
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
statsmodels==0.11.1
stevedore==3.5.2
terminado==0.17.1
tinycss2==1.2.1
toml==0.10.2
tomli==2.0.1
toolz==0.12.0
tornado==6.2
tox==3.28.0
tox-conda==0.10.2
tqdm==4.64.1
traitlets==5.7.1
typed-ast==1.5.5
typing-extensions==4.4.0
urllib3==1.26.14
virtualenv==20.26.6
wcwidth==0.2.5
webencodings==0.5.1
websocket-client==0.58.0
widgetsnbextension==3.5.2
zipp==3.11.0
zstandard==0.19.0

name: estimagic
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - alabaster=0.7.12=pyhd3eb1b0_0
  - algopy=0.6.1=pyhd8ed1ab_0
  - ampl-mp=3.1.0=hf726d26_1005
  - anaconda-client=1.11.0=py37h06a4308_0
  - anyio=3.5.0=py37h06a4308_0
  - argon2-cffi=21.3.0=pyhd3eb1b0_0
  - argon2-cffi-bindings=21.2.0=py37h7f8727e_0
  - attrs=22.1.0=py37h06a4308_0
  - babel=2.11.0=py37h06a4308_0
  - backcall=0.2.0=pyhd3eb1b0_0
  - backports=1.1=pyhd3eb1b0_1
  - backports.functools_lru_cache=1.6.4=pyhd3eb1b0_0
  - backports.tempfile=1.0=pyhd3eb1b0_1
  - backports.weakref=1.0.post1=py_1
  - beautifulsoup4=4.11.1=py37h06a4308_0
  - blas=1.0=openblas
  - bleach=4.1.0=pyhd3eb1b0_0
  - bokeh=1.1.0=py37_0
  - boost=1.70.0=py37h9de70de_1
  - boost-cpp=1.70.0=ha2d47e9_1
  - brotli=1.0.9=h5eee18b_9
  - brotli-bin=1.0.9=h5eee18b_9
  - brotlipy=0.7.0=py37h27cfd23_1003
  - bzip2=1.0.8=h5eee18b_6
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2022.12.7=py37h06a4308_0
  - cffi=1.15.1=py37h5eee18b_3
  - chardet=4.0.0=py37h06a4308_1003
  - charset-normalizer=2.0.4=pyhd3eb1b0_0
  - click=8.0.4=py37h06a4308_0
  - cloudpickle=2.0.0=pyhd3eb1b0_0
  - clyent=1.2.2=py37_1
  - colorama=0.4.6=py37h06a4308_0
  - conda=23.1.0=py37h06a4308_0
  - conda-build=3.23.3=py37h06a4308_0
  - conda-package-handling=2.0.2=py37h06a4308_0
  - conda-package-streaming=0.7.0=py37h06a4308_0
  - conda-verify=3.4.2=py_1
  - cryptography=39.0.1=py37h9ce1e76_0
  - cycler=0.11.0=pyhd3eb1b0_0
  - cyrus-sasl=2.1.28=h9c0eb46_1
  - dbus=1.13.18=hb2f20db_0
  - debugpy=1.5.1=py37h295c915_0
  - decorator=5.1.1=pyhd3eb1b0_0
  - defusedxml=0.7.1=pyhd3eb1b0_0
  - eigen=3.4.0=hdb19cb5_0
  - entrypoints=0.4=py37h06a4308_0
  - expat=2.6.4=h6a678d5_0
  - flit-core=3.6.0=pyhd3eb1b0_0
  - fontconfig=2.14.1=h52c9d5c_1
  - fonttools=4.25.0=pyhd3eb1b0_0
  - freetype=2.12.1=h4a9f257_0
  - future=0.18.3=py37h06a4308_0
  - fuzzywuzzy=0.18.0=py37h06a4308_0
  - giflib=5.2.2=h5eee18b_0
  - glib=2.78.4=h6a678d5_0
  - glib-tools=2.78.4=h6a678d5_0
  - glob2=0.7=pyhd3eb1b0_0
  - gst-plugins-base=1.14.1=h6a678d5_1
  - gstreamer=1.14.1=h5eee18b_1
  - icu=58.2=he6710b0_3
  - idna=3.4=py37h06a4308_0
  - imagesize=1.4.1=py37h06a4308_0
  - importlib-metadata=4.11.3=py37h06a4308_0
  - importlib_metadata=4.11.3=hd3eb1b0_0
  - importlib_resources=5.2.0=pyhd3eb1b0_1
  - ipopt=3.14.6=h630875f_0
  - ipykernel=6.15.2=py37h06a4308_0
  - ipyparallel=6.3.0=py37h06a4308_0
  - ipython=7.31.1=py37h06a4308_1
  - ipython_genutils=0.2.0=pyhd3eb1b0_1
  - ipywidgets=7.6.5=pyhd3eb1b0_2
  - jedi=0.18.1=py37h06a4308_1
  - jinja2=3.1.2=py37h06a4308_0
  - jpeg=9e=h5eee18b_3
  - json5=0.9.6=pyhd3eb1b0_0
  - jsonschema=4.17.3=py37h06a4308_0
  - jupyter=1.0.0=py37h06a4308_8
  - jupyter_client=7.4.9=py37h06a4308_0
  - jupyter_console=6.4.4=py37h06a4308_0
  - jupyter_core=4.11.2=py37h06a4308_0
  - jupyter_server=1.23.4=py37h06a4308_0
  - jupyterlab=3.5.3=py37h06a4308_0
  - jupyterlab_pygments=0.1.2=py_0
  - jupyterlab_server=2.19.0=py37h06a4308_0
  - jupyterlab_widgets=1.0.0=pyhd3eb1b0_1
  - kiwisolver=1.4.4=py37h6a678d5_0
  - krb5=1.20.1=h568e23c_1
  - lcms2=2.16=hb9589c4_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - lerc=4.0.0=h6a678d5_0
  - libarchive=3.6.2=hab531cd_0
  - libblas=3.9.0=16_linux64_openblas
  - libbrotlicommon=1.0.9=h5eee18b_9
  - libbrotlidec=1.0.9=h5eee18b_9
  - libbrotlienc=1.0.9=h5eee18b_9
  - libclang=14.0.6=default_hc6dbbc7_2
  - libclang13=14.0.6=default_he11475f_2
  - libcups=2.4.2=ha637b67_0
  - libdeflate=1.22=h5eee18b_0
  - libedit=3.1.20230828=h5eee18b_0
  - libevent=2.1.12=h8f2d780_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc=14.2.0=h767d61c_2
  - libgcc-ng=14.2.0=h69a702a_2
  - libgfortran-ng=7.5.0=ha8ba4b0_17
  - libgfortran4=7.5.0=ha8ba4b0_17
  - libgfortran5=14.2.0=hf1ad2bd_2
  - libglib=2.78.4=hdc74915_0
  - libgomp=14.2.0=h767d61c_2
  - libiconv=1.16=h5eee18b_3
  - liblapack=3.9.0=16_linux64_openblas
  - liblief=0.12.3=h6a678d5_0
  - libllvm14=14.0.6=hecde1de_4
  - libopenblas=0.3.21=h043d6bf_0
  - libpng=1.6.39=h5eee18b_0
  - libpq=12.15=h37d81fd_1
  - libsodium=1.0.18=h7b6447c_0
  - libstdcxx-ng=11.2.0=h1234567_1
  - libtiff=4.5.1=hffd6297_1
  - libuuid=1.41.5=h5eee18b_0
  - libwebp=1.2.4=h11a3e52_1
  - libwebp-base=1.2.4=h5eee18b_1
  - libxcb=1.15=h7f8727e_0
  - libxkbcommon=1.0.1=hfa300c1_0
  - libxml2=2.9.14=h74e7548_0
  - libxslt=1.1.35=h4e12654_0
  - lxml=4.9.1=py37h1edc446_0
  - lz4-c=1.9.4=h6a678d5_1
  - markupsafe=2.1.1=py37h7f8727e_0
  - matplotlib=3.4.3=py37h06a4308_0
  - matplotlib-base=3.4.3=py37hbbc1b5f_0
  - matplotlib-inline=0.1.6=py37h06a4308_0
  - metis=5.1.0=hf484d3e_4
  - mistune=0.8.4=py37h14c3975_1001
  - mumps-include=5.2.1=ha770c72_14
  - mumps-seq=5.2.1=h2104b81_11
  - munkres=1.1.4=py_0
  - mysql=5.7.24=he378463_2
  - nbclassic=0.5.2=py37h06a4308_0
  - nbclient=0.5.13=py37h06a4308_0
  - nbconvert=6.5.4=py37h06a4308_0
  - nbformat=5.7.0=py37h06a4308_0
  - nbsphinx=0.9.7=pyhd8ed1ab_0
  - ncurses=6.4=h6a678d5_0
  - nest-asyncio=1.5.6=py37h06a4308_0
  - nlopt=2.6.1=py37h66931aa_2
  - notebook=6.5.2=py37h06a4308_0
  - notebook-shim=0.2.2=py37h06a4308_0
  - numdifftools=0.9.41=pyhd8ed1ab_0
  - numpy=1.16.6=py37h0708ffd_4
  - numpy-base=1.16.6=py37ha8aedfd_4
  - openssl=1.1.1w=h7f8727e_0
  - packaging=22.0=py37h06a4308_0
  - pagmo=2.10=h46e0a30_1002
  - pandas=0.24.2=py37he6710b0_0
  - pandocfilters=1.5.0=pyhd3eb1b0_0
  - parso=0.8.3=pyhd3eb1b0_0
  - patch=2.7.6=h7b6447c_1001
  - patchelf=0.17.2=h6a678d5_0
  - patsy=0.5.3=py37h06a4308_0
  - pcre2=10.42=hebb0a14_1
  - pexpect=4.8.0=pyhd3eb1b0_3
  - pickleshare=0.7.5=pyhd3eb1b0_1003
  - pillow=9.4.0=py37h6a678d5_0
  - pip=19.0.3=py37_0
  - pkginfo=1.8.3=py37h06a4308_0
  - pkgutil-resolve-name=1.3.10=py37h06a4308_0
  - pluggy=1.0.0=py37h06a4308_1
  - ply=3.11=py37_0
  - prometheus_client=0.14.1=py37h06a4308_0
  - prompt-toolkit=3.0.43=pyha770c72_0
  - prompt_toolkit=3.0.43=hd3eb1b0_0
  - psutil=5.9.0=py37h5eee18b_0
  - ptyprocess=0.7.0=pyhd3eb1b0_2
  - py-lief=0.12.3=py37h6a678d5_0
  - pycosat=0.6.4=py37h5eee18b_0
  - pycparser=2.21=pyhd3eb1b0_0
  - pygments=2.11.2=pyhd3eb1b0_0
  - pygmo=2.10=py37h86cc20e_1003
  - pyopenssl=23.0.0=py37h06a4308_0
  - pyparsing=3.0.9=py37h06a4308_0
  - pyqt=5.15.7=py37h6a678d5_1
  - pyqt5-sip=12.11.0=py37h6a678d5_1
  - pyrsistent=0.18.0=py37heee7806_0
  - pysocks=1.7.1=py37_1
  - python=3.7.16=h7a1cb2a_0
  - python-dateutil=2.8.2=pyhd3eb1b0_0
  - python-fastjsonschema=2.16.2=py37h06a4308_0
  - python-levenshtein=0.12.2=py37h27cfd23_0
  - python-libarchive-c=5.1=pyhd3eb1b0_0
  - python_abi=3.7=2_cp37m
  - pytz=2022.7=py37h06a4308_0
  - pyyaml=6.0=py37h5eee18b_1
  - pyzmq=23.2.0=py37h6a678d5_0
  - qt-main=5.15.2=h5b8104b_9
  - qt-webengine=5.15.9=hd2b0992_4
  - qtconsole=5.4.0=py37h06a4308_0
  - qtpy=2.2.0=py37h06a4308_0
  - qtwebkit=5.212=h4eab89a_4
  - readline=8.2=h5eee18b_0
  - requests=2.28.1=py37h06a4308_0
  - ripgrep=14.1.0=h594256b_0
  - ruamel.yaml=0.17.21=py37h5eee18b_0
  - ruamel.yaml.clib=0.2.6=py37h5eee18b_1
  - scipy=1.2.1=py37he2b7bc3_0
  - scotch=6.0.9=h3858553_1
  - seaborn=0.11.2=pyhd3eb1b0_0
  - send2trash=1.8.0=pyhd3eb1b0_1
  - setuptools=65.6.3=py37h06a4308_0
  - sip=6.6.2=py37h6a678d5_0
  - six=1.16.0=pyhd3eb1b0_1
  - sniffio=1.2.0=py37h06a4308_1
  - snowballstemmer=2.2.0=pyhd3eb1b0_0
  - soupsieve=2.3.2.post1=py37h06a4308_0
  - sphinx=5.0.2=py37h06a4308_0
  - sphinx_rtd_theme=0.4.3=pyhd3eb1b0_0
  - sphinxcontrib-applehelp=1.0.2=pyhd3eb1b0_0
  - sphinxcontrib-devhelp=1.0.2=pyhd3eb1b0_0
  - sphinxcontrib-htmlhelp=2.0.0=pyhd3eb1b0_0
  - sphinxcontrib-jsmath=1.0.1=pyhd3eb1b0_0
  - sphinxcontrib-qthelp=1.0.3=pyhd3eb1b0_0
  - sphinxcontrib-serializinghtml=1.1.5=pyhd3eb1b0_0
  - sqlite=3.45.3=h5eee18b_0
  - statsmodels=0.11.1=py37h7b6447c_0
  - terminado=0.17.1=py37h06a4308_0
  - tinycss2=1.2.1=py37h06a4308_0
  - tk=8.6.14=h39e8969_0
  - toml=0.10.2=pyhd3eb1b0_0
  - tomli=2.0.1=py37h06a4308_0
  - toolz=0.12.0=py37h06a4308_0
  - tornado=6.2=py37h5eee18b_0
  - tqdm=4.64.1=py37h06a4308_0
  - traitlets=5.7.1=py37h06a4308_0
  - typing-extensions=4.4.0=py37h06a4308_0
  - typing_extensions=4.4.0=py37h06a4308_0
  - urllib3=1.26.14=py37h06a4308_0
  - wcwidth=0.2.5=pyhd3eb1b0_0
  - webencodings=0.5.1=py37_1
  - websocket-client=0.58.0=py37h06a4308_4
  - wheel=0.38.4=py37h06a4308_0
  - widgetsnbextension=3.5.2=py37h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - yaml=0.2.5=h7b6447c_0
  - zeromq=4.3.5=h6a678d5_0
  - zipp=3.11.0=py37h06a4308_0
  - zlib=1.2.13=h5eee18b_1
  - zstandard=0.19.0=py37h5eee18b_0
  - zstd=1.5.6=hc292b87_0
  - pip:
      - black==23.3.0
      - cfgv==3.3.1
      - distlib==0.3.9
      - doc8==1.0.0
      - docutils==0.20.1
      - exceptiongroup==1.2.2
      - execnet==2.0.2
      - filelock==3.12.2
      - identify==2.5.24
      - iniconfig==2.0.0
      - mypy-extensions==1.0.0
      - nodeenv==1.9.1
      - pathspec==0.11.2
      - pbr==6.1.1
      - platformdirs==4.0.0
      - pre-commit==2.21.0
      - py==1.11.0
      - pytest==7.4.4
      - pytest-mock==3.11.1
      - pytest-xdist==3.5.0
      - restructuredtext-lint==1.4.0
      - stevedore==3.5.2
      - tox==3.28.0
      - tox-conda==0.10.2
      - typed-ast==1.5.5
      - virtualenv==20.26.6
prefix: /opt/conda/envs/estimagic

estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_from_internal[internal2-expected_external2-c] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_to_internal[params19-expected_internal19-i] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_from_internal[internal7-expected_external7-h] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_from_internal[internal11-expected_external11-j1] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_to_internal[params4-expected_internal4-e] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_to_internal[params2-expected_internal2-c] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_from_internal[internal16-expected_external16-c] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_to_internal[params0-expected_internal0-a] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_from_internal[internal6-expected_external6-g] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_to_internal[params18-expected_internal18-h] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_from_internal[internal8-expected_external8-i] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_to_internal[params26-expected_internal26-e] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_to_internal[params21-expected_internal21-m] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_to_internal[params6-expected_internal6-g] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_to_internal[params28-expected_internal28-g] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_from_internal[internal13-expected_external13-l] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_to_internal[params17-expected_internal17-g] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_to_internal[params3-expected_internal3-d] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_to_internal[params31-expected_internal31-k] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_to_internal[params32-expected_internal32-m] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_to_internal[params30-expected_internal30-i] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_to_internal[params24-expected_internal24-c] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_to_internal[params5-expected_internal5-f] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_to_internal[params12-expected_internal12-b] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_to_internal[params10-expected_internal10-m] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_to_internal[params7-expected_internal7-h] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_to_internal[params9-expected_internal9-k] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_from_internal[internal18-expected_external18-e] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_from_internal[internal1-expected_external1-b] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_to_internal[params16-expected_internal16-f] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_to_internal[params23-expected_internal23-b] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_from_internal[internal0-expected_external0-a] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_from_internal[internal17-expected_external17-d] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_from_internal[internal9-expected_external9-k] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_from_internal[internal19-expected_external19-f] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_to_internal[params11-expected_internal11-a] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_to_internal[params27-expected_internal27-f] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_to_internal[params1-expected_internal1-b] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_to_internal[params8-expected_internal8-i] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_from_internal[internal3-expected_external3-d] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_from_internal[internal20-expected_external20-g] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_from_internal[internal14-expected_external14-a] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_from_internal[internal4-expected_external4-e] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_to_internal[params13-expected_internal13-c] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_from_internal[internal10-expected_external10-m] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_to_internal[params14-expected_internal14-d] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_from_internal[internal12-expected_external12-j2] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_to_internal[params29-expected_internal29-h] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_from_internal[internal15-expected_external15-b] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_to_internal[params20-expected_internal20-k] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_to_internal[params15-expected_internal15-e] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_to_internal[params22-expected_internal22-a] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_from_internal[internal5-expected_external5-f] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_to_internal[params25-expected_internal25-d] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_from_internal[internal40-expected_external40-j2] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_from_internal[internal37-expected_external37-k] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_from_internal[internal25-expected_external25-j1] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_from_internal[internal38-expected_external38-m] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_from_internal[internal27-expected_external27-l] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_from_internal[internal23-expected_external23-k] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_from_internal[internal21-expected_external21-h] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_from_internal[internal39-expected_external39-j1] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_from_internal[internal33-expected_external33-f] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_from_internal[internal28-expected_external28-a] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_from_internal[internal30-expected_external30-c] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_from_internal[internal24-expected_external24-m] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_from_internal[internal22-expected_external22-i] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_from_internal[internal32-expected_external32-e] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_from_internal[internal31-expected_external31-d] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_from_internal[internal29-expected_external29-b] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_from_internal[internal35-expected_external35-h] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_from_internal[internal26-expected_external26-j2] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_from_internal[internal36-expected_external36-i] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_from_internal[internal34-expected_external34-g] estimagic/tests/optimization/test_reparametrize.py::test_reparametrize_from_internal[internal41-expected_external41-l]
docs/source/inference.rst estimagic/optimization/reparametrize.py setup.py estimagic/optimization/optimize.py estimagic/differentiation/differentiation.py environment.yml docs/source/optimize.rst tox.ini .pre-commit-config.yaml docs/source/estimation.rst
docs/source/inference.rst estimagic/optimization/reparametrize.py setup.py estimagic/optimization/optimize.py estimagic/differentiation/differentiation.py environment.yml docs/source/optimize.rst tox.ini .pre-commit-config.yaml docs/source/estimation.rst